Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am emilevauge on github.
* I am emilevauge (https://keybase.io/emilevauge) on keybase.
* I have a public key whose fingerprint is 2F1B 8F4B 554E DF04 E1F8 0247 7B9C 47CC D0F6 2550
To claim this, I am signing this object:
//Configuration is a struct which contains all differents type to field
//using parsers on string, time.Duration, pointer, bool, int, int64, time.Time, float64
type Configuration struct {
VersionName string //no description struct tag, it will not be flaged
LogLevel string `short:"l" description:"Log level"` //string type field, short flag "-l"
Timeout time.Duration `description:"Timeout duration"` //time.Duration type field
Db *DatabaseInfo `description:"Enable database"` //pointer type field (on DatabaseInfo)
Owner *OwnerInfo `description:"Enable Owner description"` //another pointer type field (on OwnerInfo)
}
@emilevauge
emilevauge / docker.tmpl
Created March 3, 2016 17:37
traefik - docker < 1.9
[backends]{{range .Containers}}
[backends.backend-{{getBackend .}}.servers.server-{{.Name | replace "/" "" | replace "." "-"}}]
url = "{{getProtocol .}}://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
weight = {{getWeight .}}
{{end}}
[frontends]{{range $frontend, $containers := .Frontends}}
[frontends."frontend-{{$frontend}}"]{{$container := index $containers 0}}
backend = "backend-{{getBackend $container}}"
passHostHeader = {{getPassHostHeader $container}}

Keybase proof

I hereby claim:

  • I am emilevauge on github.
  • I am emilevauge (https://keybase.io/emilevauge) on keybase.
  • I have a public key whose fingerprint is D826 EBAB 0878 B3D0 8967 BE62 FA76 DE8F 3EFA 188F

To claim this, I am signing this object: