go package

tags: learning go programming

content

  • a directory can only contain at most 1 package

  • in other words, all .go file in a directory must belong to the same package (to avoid potential loop import like python?)

    • otherwise an error will be thrown by the compiler
  • a repo contains one or more modules, usually one

  • go.mod declares the modules in the repo

up

down

reference