Can someone please explain Go project structures to me like I'm a child, please?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • golang-standards/project-layout

    Standard Go Project Layout

  • Awesome! I've also following the same project structure rules for several years of golang development. It should be somewhere in official documentation, I think :D Like here https://github.com/golang-standards/project-layout

  • my-project

  • github.com/me/my-project naming convention is not strictly necessary, but allows you to share your libraries more easily with others

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Puts Debuggerer

    Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.

  • My main hiccup.. is that it seems I MUSTcommit my library to github.com, in order to then get examples/.. to import it. I can't just use relative paths on imports.. which I am OK With if it just worked. But examples/... is outside of internal/ so anything in examples cant import internal/ fine.. but ALSO I can't seem to get pkg/public/.. to import anything in internal/.. and that whole structure just confuses me because I constantly get compile issues that take me hours to figure out and eventually I just have no internal/ and everything is just in pkg/... which defeats the purpose of your structure. :(

  • godevcontainer

    Golang development container for Visual Studio Code Remote Containers Development

  • If you have Docker installed and use VScode, you could try https://github.com/qdm12/godevcontainer which sets up your dev environment in a container so it's more reproducible.

  • ss-server

    Shadowsocks server to use with Docker and to integrate in other Go programs

  • A working example I have in mind is github.com/qdm12/ss-server if that can help.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts