1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Remove NewKey and update doc comment (#721)

* Update doc comment

* Remove NewKey

* NewKey->Key
This commit is contained in:
Joshua MacDonald
2020-05-13 16:21:23 -07:00
committed by GitHub
parent 1301b6f3e4
commit 587cde3352
26 changed files with 155 additions and 164 deletions

View File

@@ -34,7 +34,7 @@ type Resource struct {
var emptyResource Resource
// NewKey creates a resource from a set of attributes. If there are
// Key creates a resource from a set of attributes. If there are
// duplicate keys present in the list of attributes, then the last
// value found for the key is preserved.
func New(kvs ...kv.KeyValue) *Resource {
@@ -96,7 +96,7 @@ func Merge(a, b *Resource) *Resource {
b = Empty()
}
// Note: 'b' is listed first so that 'a' will overwrite with
// last-value-wins in label.NewKey()
// last-value-wins in label.Key()
combine := append(b.Attributes(), a.Attributes()...)
return New(combine...)
}