Skip to content

Conversation

@cocap10
Copy link

@cocap10 cocap10 commented Aug 11, 2016

This PR fixes the toml parsing behavior :

  • If a key on a pointer field of the configuration structure is called in the toml, the default pointer value will be set in the struct.
  • If a under field of this pointer is called as well, its value will overwrite the default pointer value.

example 1 :

Running træfik with the following toml :

[docker]

Træfik runs with default pointer value on docker field :

Docker":{"Watch":true,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"","TLS":null,"ExposedByDefault":true}

example 2 :

Running træfik with the following toml :

[docker]
watch=false

Træfik runs with default pointer value overwritten by the under field watch :

Docker":{"Watch":false,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"","TLS":null,"ExposedByDefault":true}

@errm
Copy link
Contributor

errm commented Aug 15, 2016

LGTM

@vdemeester
Copy link
Contributor

LGTM 🐵

@vdemeester vdemeester merged commit c1b0c41 into traefik:master Aug 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants