add bracket format
This commit is contained in:
@@ -501,3 +501,14 @@ type Field struct {
|
||||
func (f Field) String() string {
|
||||
return fmt.Sprintf("%s=%+v", f.Key, f.Value)
|
||||
}
|
||||
|
||||
// String implent stringer.
|
||||
func (f Field) IsKey(keys ...string) bool {
|
||||
for _, key := range keys {
|
||||
if key == f.Key {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user