Method receiver 'db' is not referenced in method's body, consider removing it
35}
36
37// GetDelimiters implements the method Connection.GetDelimiters.
38func (db *OceanBase) GetDelimiters() []string { 39 return []string{"`", "`"}
40}
41
Method receiver 'db' is not referenced in method's body, consider removing it
91}
92
93// QueryWithTx is query method within the transaction.
94func (db *OceanBase) QueryWithTx(tx *sql.Tx, query string, args ...interface{}) ([]map[string]interface{}, error) { 95 return CommonQueryWithTx(tx, query, args...)
96}
97
Method receiver 'db' is not referenced in method's body, consider removing it
96}
97
98// ExecWithTx is exec method within the transaction.
99func (db *OceanBase) ExecWithTx(tx *sql.Tx, query string, args ...interface{}) (sql.Result, error) {100 return CommonExecWithTx(tx, query, args...)
101}
102
Method receiver 'db' is not referenced in method's body, consider removing it
25}
26
27// GetDelimiter implements the method Connection.GetDelimiter.
28func (db *OceanBase) GetDelimiter() string { 29 return "`"
30}
31
Method receiver 'db' is not referenced in method's body, consider removing it
20}
21
22// Name implements the method Connection.Name.
23func (db *OceanBase) Name() string { 24 return "OceanBase"
25}
26
Method receiver 'db' is not referenced in method's body, consider removing it
30}
31
32// GetDelimiter2 implements the method Connection.GetDelimiter2.
33func (db *OceanBase) GetDelimiter2() string { 34 return "`"
35}
36
Method receiver 'sql' is not referenced in method's body, consider removing it
157 return joins
158}
159
160func (sql *SQLComponent) processLeftJoinField(field, delimiter, delimiter2 string) string {161 arr := strings.Split(field, ".")
162 if len(arr) > 0 {
163 return delimiter + arr[0] + delimiter2 + "." + delimiter + arr[1] + delimiter2
Method receiver 's' is not referenced in method's body, consider removing it
1302 C *Config
1303}
1304
1305func (s *Service) Name() string {1306 return "config"
1307}
1308
Description
Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep the same method signature, omit the receiver name or '_' as it is unused.
Bad practice
func (f *Unix) Name() string {
return "unix"
}
func (_ *Unix) Name() string {
return "unix"
}
Recommended
func (*Unix) Name() string {
return "unix"
}