mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-07 08:36:23 -07:00
refactor: fix unused method receiver
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.
This commit is contained in:
parent
60cd1c7bc3
commit
39fdc0566f
4 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ type GCDatabaseUpdater struct {
|
|||
}
|
||||
|
||||
// IsMigratingInPlace implements common.DBMigrator.
|
||||
func (dbu *GCDatabaseUpdater) IsMigratingInPlace() bool {
|
||||
func (*GCDatabaseUpdater) IsMigratingInPlace() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ func (m *Pre2021Migrator) migrateBansInPlace() error {
|
|||
return m.migrateBansToNewDB()
|
||||
}
|
||||
|
||||
func (m *Pre2021Migrator) migrateBan(tx *sql.Tx, ban *migrationBan, boardID *int, errEv *zerolog.Event) error {
|
||||
func (*Pre2021Migrator) migrateBan(tx *sql.Tx, ban *migrationBan, boardID *int, errEv *zerolog.Event) error {
|
||||
migratedBan := &gcsql.IPBan{
|
||||
BoardID: boardID,
|
||||
RangeStart: ban.ip,
|
||||
|
|
|
@ -32,7 +32,7 @@ type migrationPost struct {
|
|||
oldParentID int
|
||||
}
|
||||
|
||||
func (m *Pre2021Migrator) migratePost(tx *sql.Tx, post *migrationPost, errEv *zerolog.Event) error {
|
||||
func (*Pre2021Migrator) migratePost(tx *sql.Tx, post *migrationPost, errEv *zerolog.Event) error {
|
||||
var err error
|
||||
opts := &gcsql.RequestOptions{Tx: tx}
|
||||
if post.oldParentID == 0 {
|
||||
|
|
|
@ -62,7 +62,7 @@ type testResponseWriter struct {
|
|||
func (w *testResponseWriter) Header() http.Header {
|
||||
return w.header
|
||||
}
|
||||
func (w *testResponseWriter) Write([]byte) (int, error) {
|
||||
func (*testResponseWriter) Write([]byte) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
func (w *testResponseWriter) WriteHeader(s int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue