code: func IntInSlice(valid []int) schema.SchemaValidateFunc {
  	return func(i interface{}, k string) (s []string, es []error) {
  		v, ok := i.(int)
  		if !ok {
  			es = append(es, fmt.Errorf("expected type of %s to be an integer", k))
  			return
  		}
  
  		for _, validInt := range valid {
  			if v == validInt {
  				return
  			}
  		}
  
  		es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v))
  		return
  	}
  }
docs: // IntInSlice returns a SchemaValidateFunc which tests if the provided value
  // is of type int and matches the value of an element in the valid slice