Skip to content

optimal command to compile from source #12

@danie-dejager

Description

@danie-dejager

What would be the preferred and optimal build command be?
I used:

GO111MODULE=on CGO_ENABLED=0 go build -v -trimpath -buildmode=pie -modcacherw -tags netgo -ldflags="-s -w"

I get a fairly decent binary at 5.1M but for instance I then cannot compress it with UPX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions