Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Golang] bugfix #2517 #2558

Merged
merged 1 commit into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion golang/src/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func TestFunctionClosureArg(t *testing.T) {
return
}
if ret1.AsInt64() != ret.AsInt64() {
err = fmt.Errorf("Invoke with int64 didn't match with Value\n")
err = fmt.Errorf("Invoke with int64 didn't match with Value")
return
}
retVal = ret
Expand Down
8 changes: 4 additions & 4 deletions golang/src/ndarray.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (parray Array) CopyFrom(val interface{}) (err error) {
datalen = len(sliceVal) * int(dtype.bits / 8)
return parray.nativeCopyFrom(data, datalen)
default:
err = fmt.Errorf("Given type not supported : %v\n", reflect.TypeOf(val))
err = fmt.Errorf("Given type not supported : %v", reflect.TypeOf(val))
return
}
return
Expand Down Expand Up @@ -195,7 +195,7 @@ func (parray Array) AsSlice() (retVal interface{}, err error) {
err = parray.nativeCopyTo(data, datalen)
retVal = sliceVal
default:
err = fmt.Errorf("Given type not supported : %v\n", parray.GetDType())
err = fmt.Errorf("Given type not supported : %v", parray.GetDType())
return
}
return
Expand Down Expand Up @@ -279,7 +279,7 @@ func Empty(shape []int64, args ...interface{}) (parray *Array, err error) {
ctx := Context{KDLCPU, 0}

if len(shape) < 1 {
err = fmt.Errorf("Invalid shape for Array creation: %v\n", len(shape))
err = fmt.Errorf("Invalid shape for Array creation: %v", len(shape))
return
}

Expand All @@ -290,7 +290,7 @@ func Empty(shape []int64, args ...interface{}) (parray *Array, err error) {
case Context:
ctx = args[i].(Context)
default:
err = fmt.Errorf("Invalid Optional Argument Type: %T\n", val)
err = fmt.Errorf("Invalid Optional Argument Type: %T", val)
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions golang/src/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (tvmval *Value) setValue(val interface{}) (retVal int32, err error) {
case func (args ...*Value) (interface{}, error):
fhandle, apierr := ConvertFunction(val)
if apierr != nil {
err = fmt.Errorf("Given value Type not defined for Value: %v : %T\n", val, val);
err = fmt.Errorf("Given value Type not defined for Value: %v : %T", val, val);
return
}
tvmval.setVFHandle(*fhandle)
Expand All @@ -320,7 +320,7 @@ func (tvmval *Value) setValue(val interface{}) (retVal int32, err error) {
fromval := val.(Value)
tvmval.moveFrom(&fromval)
default:
err = fmt.Errorf("Given value Type not defined for Value: %v : %T\n", val, val);
err = fmt.Errorf("Given value Type not defined for Value: %v : %T", val, val);
}
retVal = tvmval.dtype
return
Expand Down