3 ms·
Like the other commenter said: Functions/Fields in structs that start with a capital letter are visible to other packages. Functions starting with lower case le
by leon_ 15y ago
Like the other commenter said: Functions/Fields in structs that start with a capital letter are visible to other packages. Functions starting with lower case letters are like C static and fields are (package) private.
I'm not perfectly happy with this convention because I prefer the everything_lower_case_with_underscores style but you get used to it. Go's benefits out weight its awkward quirks by far.