Skip to content

Commit

Permalink
chore(deps): Bumping httputils and using new logger flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Aug 30, 2020
1 parent 74943a1 commit 44cc37e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ Usage of api:
[http] Key file {API_KEY}
-location string
[hello] TimeZone for displaying current time {API_LOCATION} (default "Europe/Paris")
-loggerJson
[logger] Log format as JSON {API_LOGGER_JSON}
-loggerLevel string
[logger] Logger level {API_LOGGER_LEVEL} (default "INFO")
-loggerLevelKey string
[logger] Key for level in JSON {API_LOGGER_LEVEL_KEY} (default "level")
-loggerMessageKey string
[logger] Key for message in JSON {API_LOGGER_MESSAGE_KEY} (default "message")
-loggerTimeKey string
[logger] Key for timestam in JSON {API_LOGGER_TIME_KEY} (default "time")
-okStatus int
[http] Healthy HTTP Status code {API_OK_STATUS} (default 204)
-port uint
Expand Down
2 changes: 2 additions & 0 deletions cmd/goweb/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {

serverConfig := httputils.Flags(fs, "")
alcotestConfig := alcotest.Flags(fs, "")
loggerConfig := logger.Flags(fs, "logger")
prometheusConfig := prometheus.Flags(fs, "prometheus")
owaspConfig := owasp.Flags(fs, "")
corsConfig := cors.Flags(fs, "cors")
Expand All @@ -37,6 +38,7 @@ func main() {
logger.Fatal(fs.Parse(os.Args[1:]))

alcotest.DoAndExit(alcotestConfig)
logger.Global(logger.New(loggerConfig))

server := httputils.New(serverConfig)
server.Middleware(prometheus.New(prometheusConfig).Middleware)
Expand Down
14 changes: 2 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/ViBiOh/httputils v1.8.2 h1:ulvdhtq8/Ww4QihYJ5uf0WDTG42yPuwojUCbfv/9W2E=
github.com/ViBiOh/httputils/v3 v3.22.1 h1:Qi/eOXl6LOmBnoy1yxn7OqEXjDfGxce5teKmkTPVOQM=
github.com/ViBiOh/httputils/v3 v3.22.1/go.mod h1:Nv4rEUOGP94qzveoWnoo28/lJjYqb3kzV4CRFrItfSU=
github.com/ViBiOh/httputils/v3 v3.22.2 h1:n7BVwxkSkrf3erRjSMMn6/kxZK8Y6PBnwegDkt90RPc=
github.com/ViBiOh/httputils/v3 v3.22.2/go.mod h1:S5I+pz+Ec4KkDKIlaLfv/UcSl2BxfSLf/NO7KhzBYyU=
github.com/ViBiOh/httputils/v3 v3.24.0 h1:G00jyhjkucG2H5g+AdBi+6+ckrH9IZRisyse/oyBlYc=
github.com/ViBiOh/httputils/v3 v3.24.0/go.mod h1:CyghGXY/VuG6Geo/h0jaEFFokrnB+1JEgKh/s+uaB1E=
github.com/ViBiOh/httputils/v3 v3.25.1 h1:SzjVqtqNULy9wyfJYuk1Z7LCCU2PB9b+MpBFXzJ/H6M=
github.com/ViBiOh/httputils/v3 v3.25.1/go.mod h1:KsBEvHr3HAUCV7GwQCP6OdQUJeMP6nnOXLKVS09Pq2U=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
Expand Down Expand Up @@ -89,11 +81,9 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tdewolff/minify/v2 v2.8.0 h1:t3tOPWkTpKhsgxm3IM9Sy8hE2eIt30Oaa+2havJGGIE=
github.com/tdewolff/minify/v2 v2.8.0/go.mod h1:6zN8VLhMfFxNrwHROcboYNo2+huPNu4SV8DPh3PUQ8E=
github.com/tdewolff/minify/v2 v2.9.0 h1:9c078np6EmaBWPteq/bp43YgIlfylH8qEt+FaMfNWBo=
github.com/tdewolff/minify/v2 v2.9.0/go.mod h1:dkCdk+keSmcckneKfxOgf8/X/3iyCnz1tjIas5Sn1Cs=
github.com/tdewolff/parse/v2 v2.4.4 h1:uMdbQRtYbKR/msP9CbI7li9wK6pionYiH6s7ipltyGY=
github.com/tdewolff/parse/v2 v2.4.4/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
github.com/tdewolff/parse/v2 v2.5.0 h1:SE6eIhpSLAEgYx1EpGXIcGyggfw4omUOcSCaeaH7WJU=
github.com/tdewolff/parse/v2 v2.5.0/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
github.com/tdewolff/test v1.0.6 h1:76mzYJQ83Op284kMT+63iCNCI7NEERsIN8dLM+RiKr4=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
Expand Down

0 comments on commit 44cc37e

Please sign in to comment.