()
| 54 | } |
| 55 | |
| 56 | func ExampleAttributes_WithValue() { |
| 57 | type keyOne struct{} |
| 58 | type keyTwo struct{} |
| 59 | a := attributes.New(keyOne{}, 1) |
| 60 | a = a.WithValue(keyTwo{}, stringVal{s: "two"}) |
| 61 | fmt.Println("Key one:", a.Value(keyOne{})) |
| 62 | fmt.Println("Key two:", a.Value(keyTwo{})) |
| 63 | // Output: |
| 64 | // Key one: 1 |
| 65 | // Key two: {two} |
| 66 | } |
| 67 | |
| 68 | func ExampleAttributes_String() { |
| 69 | type key struct{} |