def HasTagValue(tags, key, value): """ returns true if given key has given value """ tval = giv.StructTagVal(key, tags) return tval == value
def FieldTagVal(self, field, key): """ returns the value for given key in tags for given field, empty string if none """ return giv.StructTagVal(key, self.FieldTags(field))
def TagValue(tags, key): """ returns tag value for given key """ return giv.StructTagVal(key, tags)