code: func (o *CreateRoleOptions) Validate() error {
  	if o.Name == "" {
  		return fmt.Errorf("name must be specified")
  	}
  
  	// validate verbs.
  	if len(o.Verbs) == 0 {
  		return fmt.Errorf("at least one verb must be specified")
  	}
  
  	for _, v := range o.Verbs {
  		if !arrayContains(validResourceVerbs, v) {
  			return fmt.Errorf("invalid verb: '%s'", v)
  		}
  	}
  
  	// validate resources.
  	if len(o.Resources) == 0 {
  		return fmt.Errorf("at least one resource must be specified")
  	}
  
  	return o.validateResource()
  }
docs: // Validate makes sure there is no discrepency in provided option values