Comment

Comment by w7

I'm not sure I understand.

Generally in Go: functions, structs, and consts are namespaced in a way I think is familiar to most, by package origin.

If something is not, then it's either a function/struct in the same namespace (same file, or directory), variable in same scope, or it's a built-in.

Built-ins like `append`, are not much different than say `map`, `filter`, `max`, etc in Python.

Anything sourced from a subdirectory, parent directory, or sibling directory needs to be explicitly imported via the module path.

parent w7 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton