5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 21:29:09 +08:00

Remove old method

This commit is contained in:
Lea Anthony 2021-01-03 22:07:05 +11:00
parent 0dc6c20c65
commit 60f67d4642
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -95,39 +95,3 @@ func getMethods(value interface{}) ([]*BoundMethod, error) {
}
return result, nil
}
//// convertArgToValue
//func convertArgToValue(input json.RawMessage, target *Parameter) (result reflect.Value, err error) {
//
// // Catch type conversion panics thrown by convert
// defer func() {
// if r := recover(); r != nil {
// // Modify error
// err = fmt.Errorf("%s", r.(string)[23:])
// }
// }()
//
// // Do the conversion
//
// // Handle nil values
// if input == nil {
// switch target.reflectType.Kind() {
// case reflect.Chan,
// reflect.Func,
// reflect.Interface,
// reflect.Map,
// reflect.Ptr,
// reflect.Slice:
// result = reflect.ValueOf(input).Convert(target.reflectType)
// default:
// return reflect.Zero(target.reflectType), fmt.Errorf("Unable to use null value")
// }
// } else {
// result = reflect.ValueOf(input).Convert(target.reflectType)
// }
//
// // We don't like doing this but it's the only way to
// // handle recover() correctly
// return
//
//}