weigj / go-odbc

ODBC Driver for Go language
Other
122 stars 49 forks source link

golint #24

Open cooljl31 opened 7 years ago

cooljl31 commented 7 years ago

I was going to use this package after follow the instructions with no success. I try to figure out how the code work this is the result i get with golint

odbc.go:54:2: don't use ALL_CAPS in Go names; use CamelCase
odbc.go:54:2: exported const BUFFER_SIZE should have comment (or a comment on this block) or be unexported
odbc.go:55:2: don't use ALL_CAPS in Go names; use CamelCase
odbc.go:59:2: exported var Genv should have comment or be unexported
odbc.go:62:6: exported type Connection should have comment or be unexported
odbc.go:67:6: exported type Statement should have comment or be unexported
odbc.go:75:6: exported type ODBCError should have comment or be unexported
odbc.go:75:6: type name will be used as odbc.ODBCError by other packages, and that stutters; consider calling this Error
odbc.go:106:1: exported function Connect should have comment or be unexported
odbc.go:134:1: exported method Connection.ExecDirect should have comment or be unexported
odbc.go:160:1: exported method Connection.Prepare should have comment or be unexported
odbc.go:176:1: exported method Connection.Commit should have comment or be unexported
odbc.go:184:1: exported method Connection.AutoCommit should have comment or be unexported
odbc.go:198:1: exported method Connection.BeginTransaction should have comment or be unexported
odbc.go:206:1: exported method Connection.Rollback should have comment or be unexported
odbc.go:214:1: exported method Connection.ServerInfo should have comment or be unexported
odbc.go:215:6: don't use underscores in Go names; var info_len should be infoLen
odbc.go:238:1: exported method Connection.ClientInfo should have comment or be unexported
odbc.go:239:6: don't use underscores in Go names; var info_len should be infoLen
odbc.go:246:2: don't use underscores in Go names; var drv_name should be drvName
odbc.go:252:2: don't use underscores in Go names; var drv_odbc_ver should be drvOdbcVer
odbc.go:258:2: don't use underscores in Go names; var drv_ver should be drvVer
odbc.go:262:1: exported method Connection.Close should have comment or be unexported
odbc.go:279:1: exported method Statement.RowsAffected should have comment or be unexported
odbc.go:289:1: exported method Statement.Cancel should have comment or be unexported
odbc.go:298:1: exported method Statement.NumParams should have comment or be unexported
odbc.go:307:1: exported method Statement.Execute should have comment or be unexported
odbc.go:333:1: exported method Statement.Execute2 should have comment or be unexported
odbc.go:359:1: exported method Statement.Fetch should have comment or be unexported
odbc.go:371:6: exported type Row should have comment or be unexported
odbc.go:375:1: comment on exported method Row.Get should be of the form "Get ..."
odbc.go:391:1: exported method Row.GetInt should have comment or be unexported
odbc.go:403:1: exported method Row.GetFloat should have comment or be unexported
odbc.go:413:1: exported method Row.GetString should have comment or be unexported
odbc.go:423:1: exported method Row.Length should have comment or be unexported
odbc.go:427:1: exported method Statement.FetchAll should have comment or be unexported
odbc.go:439:1: exported method Statement.FetchOne should have comment or be unexported
odbc.go:454:1: exported method Statement.FetchOne2 should have comment or be unexported
odbc.go:469:1: exported method Statement.GetField should have comment or be unexported
odbc.go:469:33: don't use underscores in Go names; method parameter field_index should be fieldIndex
odbc.go:470:6: don't use underscores in Go names; var field_type should be fieldType
odbc.go:471:6: don't use underscores in Go names; var field_len should be fieldLen
odbc.go:549:1: exported method Statement.NumFields should have comment or be unexported
odbc.go:559:1: exported method Statement.GetParamType should have comment or be unexported
odbc.go:560:6: don't use underscores in Go names; var data_type should be dataType
odbc.go:560:17: don't use underscores in Go names; var dec_ptr should be decPtr
odbc.go:560:26: don't use underscores in Go names; var null_ptr should be nullPtr
odbc.go:561:6: don't use underscores in Go names; var size_ptr should be sizePtr
odbc.go:570:1: exported method Statement.BindParam should have comment or be unexported
odbc.go:577:6: don't use underscores in Go names; var StrLen_or_IndPt should be StrLenOrIndPt
odbc.go:653:1: exported method Statement.NextResult should have comment or be unexported
odbc.go:661:1: exported method Statement.NumRows should have comment or be unexported
odbc.go:671:1: exported method Statement.HasRows should have comment or be unexported
odbc.go:676:6: exported type Field should have comment or be unexported
odbc.go:684:1: exported method Statement.FieldMetadata should have comment or be unexported
odbc.go:713:1: exported method Statement.Close should have comment or be unexported
odbc.go:717:1: exported function Success should have comment or be unexported
odbc.go:721:1: exported function FormatError should have comment or be unexported