uber-go / config

Configuration for Go applications
https://godoc.org/go.uber.org/config
MIT License
448 stars 41 forks source link

Replace provider and value implementations #87

Closed akshayjshah closed 6 years ago

akshayjshah commented 6 years ago

With the foundation laid by an integration test suite and the internal YAML-merging package, gut the internals of this package and reimplement the core types.

The new implementation is intentionally naive: since we're only using this package at process startup, we don't care much about performance and can afford repeated round-trips through YAML. This has two benefits: the code is simpler, and it's easier to leverage all the features that gopkg.in/yaml.v2 already has (especially strict unmarshalling mode). While we have the opportunity, we also introduce a new constructor that takes functional options. I've also improved the GoDoc and deprecated a bunch of the existing APIs (though they all continue to function as expected).

This fixes issues #57, #59, #72, #73, #75, #76, #80, and a pile of other bugs that weren't reported by users.

codecov[bot] commented 6 years ago

Codecov Report

Merging #87 into master will decrease coverage by 2.07%. The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   97.62%   95.54%   -2.08%     
==========================================
  Files          13        8       -5     
  Lines         800      382     -418     
==========================================
- Hits          781      365     -416     
  Misses         11       11              
+ Partials        8        6       -2
Impacted Files Coverage Δ
nop.go 100% <100%> (ø)
expand.go 100% <100%> (ø) :arrow_up:
constructors.go 100% <100%> (ø)
option.go 100% <100%> (ø)
equal.go 75% <83.33%> (ø)
config.go 90.15% <90.15%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba07836...3e28620. Read the comment docs.

akshayjshah commented 6 years ago

screenshot_2018-06-05 replace provider and value implementations by akshayjshah pull request 87 uber-go config

:trophy: I feel like a winner. :trophy: