WithField returns a new fielder that has the key set to value.
(name string, val any)
| 97 | |
| 98 | // WithField returns a new fielder that has the key set to value. |
| 99 | func (f *F) WithField(name string, val any) *F { |
| 100 | nodes := map[string]any{ |
| 101 | name: val, |
| 102 | } |
| 103 | |
| 104 | return f.With(nodes) |
| 105 | } |
| 106 | |
| 107 | // WithFields returns a new fielder that has all the fields of the other fielder. |
| 108 | func (f *F) WithFields(fields Fielder) *F { |