rule/rule.go
func (r *Rule) AttrString(key string) string {
	attr, ok := r.attrs[key]
	if !ok {
		return ""
	}
	str, ok := attr.RHS.(*bzl.StringExpr)
	if !ok {
		return ""
	}
	return str.Value
}
func (r *Rule) AttrString(key string) string {
	attr, ok := r.attrs[key]
	if !ok {
		return ""
	}
	str, ok := attr.RHS.(*bzl.StringExpr)
	if !ok {
		return ""
	}
	return str.Value
}
// AttrString returns the value of the named attribute if it is a scalar string.
// "" is returned if the attribute is not set or is not a string.