Today we published gonew, an experimental tool for instantiating new projects in Go from predefined templates.

$ go install golang.org/x/tools/cmd/gonew@latest

  • BravoVictor@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Interesting. I’ve never personally had too many issues with startup. I actually thought Golang already had something like this built-in with ‘go mod init’. Looks like i was wrong…

    Having boilerplate does help.

    Cobra CLI is pretty great if you will only be using your binary on the cli.

  • tedu@azorius.net
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I usually forget something basic like “package main” when starting with a totally blank file, which isn’t hard to fix, but is probably frustrating when you’re just looking at a syntax error with no experience.