code: func checkType(name string, kind reflect.Kind, v interface{}) error {
  	actualKind := reflect.TypeOf(v).Kind()
  	if actualKind != kind {
  		return fmt.Errorf("parameter %q value is expected to be %v, got %v",
  			name, kind.String(), actualKind.String())
  	}
  	return nil
  }
docs: // checkType returns a formatted error if `v` is not of the expected kind.