()
| 43 | } |
| 44 | |
| 45 | func ExampleAttributes() { |
| 46 | type keyOne struct{} |
| 47 | type keyTwo struct{} |
| 48 | a := attributes.New(keyOne{}, 1).WithValue(keyTwo{}, stringVal{s: "two"}) |
| 49 | fmt.Println("Key one:", a.Value(keyOne{})) |
| 50 | fmt.Println("Key two:", a.Value(keyTwo{})) |
| 51 | // Output: |
| 52 | // Key one: 1 |
| 53 | // Key two: {two} |
| 54 | } |
| 55 | |
| 56 | func ExampleAttributes_WithValue() { |
| 57 | type keyOne struct{} |