code: func (s *State) Scan(value interface{}) error {
  	switch value.(type) {
  	case State:
  		*s = value.(State)
  	case string:
  		*s = State(value.(string))
  	case []byte:
  		*s = State(value.([]byte))
  	case nil:
  		*s = State("illegal value: nil")
  	default:
  		*s = State(fmt.Sprintf("illegal value: %+v", value))
  	}
  	return s.CheckValid()
  }
docs: // Scan implements the https://golang.org/pkg/database/sql/#Scanner interface
  // See also https://stackoverflow.com/a/25374979/835098 See also
  // https://github.com/jinzhu/gorm/issues/302#issuecomment-80566841