typeover
curriculum

Curriculum Errors & packaging Packages & imports exercise 5 · fill-word

Packages & imports

Type the keyword that begins the grouped import block. The program below needs fmt and strings from the standard library. TS: import { x } from 'y'. Go's keyword is the same word but its shape is different (parenthesised block, full path string, no destructuring).

TypeScript reference
Fill the blanks →

About this theme

Every file declares a package: package foo. Names starting with a capital letter are exported; lowercase are package-private. This rule is mechanical and pervasive; once you internalise it, you stop needing to look at export keywords because there aren't any. Imports go in a single import (...) block.