Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed May 24, 2023
1 parent 018dedc commit e2d6e08
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -56,4 +56,22 @@ app.GetEnv() // returns map[string]string
app.GetMetrics() // returns a json serializable struct
// Get Threaddump
app.GetThreadDump() // returns []byte


```

### Makefile example

```make
NAME=myApp
VERSION=$(shell git describe)
BUILDTIME=$(shell date --rfc-3339=ns)
COMMIT_AUTHOR=$(shell git show -s --format='%ae')
COMMIT_ID=$(shell git show -s --format='%H')
COMMIT_TIME=$(shell git show -s --format=%ci)
BRANCH=$(shell git branch --show)

build:
go build -ldflags="-X 'app/<subpkg>.AppName=${NAME}' -X 'app/<subpkg>.AppVersion=${VERSION}' -X 'app/<subpkg>.BuildTime=${BUILDTIME}' -X 'app/<subpkg>.CommitAuthor=${COMMIT_AUTHOR}' -X 'app/<subpkg>.CommitID=${COMMIT_ID}' -X 'app/<subpkg>.CommitTime=${COMMIT_TIME}' -X 'app/<subpkg>.Branch=${BRANCH}'"\
-o bin/$(NAME) ${ENTRYPOINT}
```

0 comments on commit e2d6e08

Please sign in to comment.