code: func (r *Rule) HasResource(resource string) bool {
  	for _, r := range r.Resources {
  		if r == resource {
  			return true
  		}
  	}
  	return false
  }
docs: // HasResource returns true if the rule has the specified resource.