A bit of context to understand why Golang is the way it is:
C is the common ancestor of modern “curly brace languages”. It is more or less a kind of portable assembly, with a weak static type system on top.
C++ started out as an extension to C, and adds better mechanisms for safety and abstraction, notably classes and templates. The result is an extremely powerful but still fundamentally unsafe language.
Java can be interpreted as “C++, the good parts” or as a “statically typed Smalltalk with C++ syntax”. It get rids of C/C++ features like pointers, const types, manual memory management, and templates, which results in a much safer and simpler language, at the cost of expressiveness. It also provides language-level support for concurrency (e.g.
synchronized methods and blocks).
Go does to C what Java did to C++: simpler type system, simpler syntax, garbage collection. Like Java, Go provides language-level solutions for concurrency (goroutines, channels), but it chooses a very different set of features. Go rejects nominal, class-based OOP as in C++ or Java and instead uses structural typing for virtual functions, in a fairly novel manner.
Go's package declarations might look like Java, but are probably inherited from the same language family where Java got it: Modula and Oberon, from the Pascal language family. Pascal also provides precedent the top-level declaration syntax (e.g.
var). “Go's heritage is at least as much Oberon as it is C!
(packages, imports, strict memory safety, garbage collection, dynamic type checks, etc.)”