Skip to content

Commit

Permalink
Format markdown (#282)
Browse files Browse the repository at this point in the history
Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Dec 23, 2020
1 parent b898b77 commit 0bfb6b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,10 @@ kubectl apply -f release.yaml
### How can I set ldflags?

[Using `-ldflags`](https://blog.cloudflare.com/setting-go-variables-at-compile-time/)
is a common way to embed version info in go binaries. (In fact, [we do this for
`ko`](https://github.com/google/ko/blob/c2b862d468505dea36ed86e724ca3d190c0d462d/.goreleaser.yml#L15-L16).)
Unforunately, because `ko` wraps `go build`, it's not possible to use this
flag directly; however, you can use the `GOFLAGS` environment variable instead:
is a common way to embed version info in go binaries. (In fact,
[we do this for `ko`](https://github.com/google/ko/blob/c2b862d468505dea36ed86e724ca3d190c0d462d/.goreleaser.yml#L15-L16).)
Unforunately, because `ko` wraps `go build`, it's not possible to use this flag
directly; however, you can use the `GOFLAGS` environment variable instead:

```
GOFLAGS="-ldflags=-X=main.version=1.2.3" ko publish .
Expand Down

0 comments on commit 0bfb6b0

Please sign in to comment.