1
0
Fork 0
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:
deepsource-autofix[bot] 2025-02-19 04:05:57 +00:00 committed by GitHub
parent 60cd1c7bc3
commit 39fdc0566f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ type GCDatabaseUpdater struct {
}
// IsMigratingInPlace implements common.DBMigrator.
func (dbu *GCDatabaseUpdater) IsMigratingInPlace() bool {
func (*GCDatabaseUpdater) IsMigratingInPlace() bool {
return true
}

View file

@ -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,

View file

@ -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 {

View file

@ -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) {