Skip to content

Commit

Permalink
Merge pull request #16 from RyougiNevermore/master
Browse files Browse the repository at this point in the history
clean code
  • Loading branch information
RyougiNevermore committed Jul 22, 2020
2 parents 6ec8203 + 29eb7e9 commit 59a803e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ func ReplaceSQL(query string, key string, args TupleArgs) string {
case int64:
buf.WriteString(fmt.Sprintf("%d", arg.(int64)))
case float32:
buf.WriteString(fmt.Sprintf("%d", arg.(float32)))
buf.WriteString(fmt.Sprintf("%f", arg.(float32)))
case float64:
buf.WriteString(fmt.Sprintf("%d", arg.(float64)))
buf.WriteString(fmt.Sprintf("%f", arg.(float64)))
default:
panic(fmt.Errorf("dalc replace sql failed, unsupport arg type, %v, %s", reflect.TypeOf(arg), query))
}
Expand Down
2 changes: 1 addition & 1 deletion args_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dalc_test

import (
"github.com/pharosnet/dalc"
"github.com/pharosnet/dalc/v2"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion example/native/dal/mode.user.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dal
import (
"context"
"database/sql"
"github.com/pharosnet/dalc"
"github.com/pharosnet/dalc/v2"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion example/native/dal/query.file_name_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dal
import (
"context"
"database/sql"
"github.com/pharosnet/dalc"
"github.com/pharosnet/dalc/v2"
"time"
)

Expand Down

0 comments on commit 59a803e

Please sign in to comment.