Skip to content

oatovar/go-ldflag-version-stamped-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Project

This is a small program used to test Trivy's ability to detect versions set in a binary via go build -ldflags='<FLAGS>'.

Building the test binary

  1. Run go build -ldflags='-X main.version=1.0.0' -o bin/test.elf .

  2. Verify that go version -m bin/test.elf | grep -F 'main.version=1.0.0' outputs

    build	-ldflags="-X main.version=1.0.0"
    
  3. Modify any Go build variables as needed to test edge cases e.g. $GOOS, $GOARCH, etc.

LICENSE

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages