mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-30 04:13:46 -04:00
In Go, all symbols should use PascalCase or camelCase. Go programmers dislike ALL_UPPER_CASE_WITH_UNDERSCORES. Use PascalCase for exported/public symbols, camelCase for internal/private symbols. In general, we should follow the Go Style Guide: https://google.github.io/styleguide/go/index I recommend we more closely follow the implementation of the C# code than the C code for figuring out how to name things. The C# version of Astronomy Engine is a better reference because Go allows quasi-object-oriented syntax and uses a similar preferred naming style. We will use idiomatic error reporting and handling, as described here: https://go.dev/blog/error-handling-and-go I removed the "status" fields from all the structs, and deleted the enumerated type astroStatus. I will add a custom error type later, and report human-readable error messages as is preferred by Go programmers.