tchncs
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
pillow@programming.dev to Golang@programming.devEnglish · 2 years ago

Is there a repository of best practices when it comes to Go? (project/file structure, decoupling)

message-square
message-square
10
link
fedilink
18
message-square

Is there a repository of best practices when it comes to Go? (project/file structure, decoupling)

pillow@programming.dev to Golang@programming.devEnglish · 2 years ago
message-square
10
link
fedilink
alert-triangle
You must log in or # to comment.
  • austin@programming.dev
    cake
    M
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 years ago

    Not quite what you’re looking for, but Google does have an official style guide which may be slightly helpful

  • CodeBlooded@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 years ago

    Apparently this repo is NOT any sort of standard, yet a lot of people are fooled to believe that based on the repo’s account name and the project’s name. I see this mentioned whenever this is asked… just an FYI…

    • foehammer@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      Some aspects of that repo are actually language features, such as the pkg and internal directories.

      • CodeBlooded@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        pkg/ isn’t a language feature. It’s just a popular convention that used to be used in the Go standard library.

        • foehammer@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 years ago

          The language feature is the internal/ directory, and it’s function of restricting dependencies from external programs.

          • CodeBlooded@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            That is correct, internal/ is a feature. I was just clarifying that the pkg/ folder isn’t any sort of language feature as you had said it was.

  • 23Ro@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    The folks over at changelog have made a quite nice podcast episode about it on gotime: https://changelog.com/gotime/278

    I found the conversation to be quite insightful.

  • Oliver Lowe@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    I often point to Upspin as it’s a real-world Go project by folks closely related to the Go project (including Rob Pike).

Golang@programming.dev

golang@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !golang@programming.dev

This is a community dedicated to the go programming language.

Useful Links:

  • Go Website
  • Effective Go
  • Go by Example
  • How to Start a Go Project

Rules:

  • Posts must be relevant to Go
  • No NSFW content
  • No hate speech, bigotry, etc
  • Try to keep discussions on topic
  • No spam of tools/companies/advertisements
  • It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 4 users / week
  • 60 users / month
  • 196 users / 6 months
  • 50 local subscribers
  • 2.47K subscribers
  • 185 Posts
  • 318 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • RandomDevOpsDude@programming.dev
  • austin@programming.dev
    cake
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org