Skip to content

Commit 2fd1af7

Browse files
committed
Merge pull request alexbrainman#69 from judwhite/feature/minor-cleanup
Minor cleanup
2 parents 91d3dd4 + 57530d8 commit 2fd1af7

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

column.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ func NewColumn(h api.SQLHSTMT, idx int) (Column, error) {
101101
default:
102102
return nil, fmt.Errorf("unsupported column type %d", sqltype)
103103
}
104-
panic("unreachable")
105104
}
106105

107106
// BaseColumn implements common column functionality.

mssql_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (params connParams) getConnAddress() (string, error) {
9090
func (params connParams) updateConnAddress(address string) error {
9191
a := strings.SplitN(address, ":", -1)
9292
if len(a) != 2 {
93-
fmt.Errorf("listen address must have 2 fields, but %d found", len(a))
93+
return fmt.Errorf("listen address must have 2 fields, but %d found", len(a))
9494
}
9595
params["server"] = a[0]
9696
params["port"] = a[1]
@@ -368,7 +368,7 @@ func TestMSSQLCreateInsertDelete(t *testing.T) {
368368
continue
369369
}
370370
if is.weight != want.weight {
371-
t.Errorf("I did not know, that %s weights %dkg (%dkg expected)", name, is.weight, want.weight)
371+
t.Errorf("I did not know, that %s weighs %fkg (%fkg expected)", name, is.weight, want.weight)
372372
continue
373373
}
374374
if !is.dob.Equal(want.dob) {

odbcstmt.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ func (s *ODBCStmt) Exec(args []driver.Value) error {
102102
// 2) set their (vars) values here;
103103
// but rebinding parameters for every new parameter value
104104
// should be efficient enough for our purpose.
105-
s.Parameters[i].BindValue(s.h, i, a)
105+
if err := s.Parameters[i].BindValue(s.h, i, a); err != nil {
106+
return err
107+
}
106108
}
107109
if testingIssue5 {
108110
time.Sleep(10 * time.Microsecond)

result.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Result struct {
1313
}
1414

1515
func (r *Result) LastInsertId() (int64, error) {
16-
// TODO(brainman): implement (*Resilt).LastInsertId
16+
// TODO(brainman): implement (*Result).LastInsertId
1717
return 0, errors.New("not implemented")
1818
}
1919

0 commit comments

Comments
 (0)