mautrix / go

A Golang Matrix framework.

Home Page:https://maunium.net/go/mautrix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After go version is updated - go1.22.3

Bala0909 opened this issue · comments

I tried to run "./build.sh" Under /opt/mautrix-whatsapp.
Below error is prompted.

maunium.net/go/mautrix-whatsapp/database
database/backfillqueue.go:34:6: BackfillType redeclared in this block
database/backfill.go:34:6: other declaration of BackfillType
database/backfillqueue.go:37:2: BackfillImmediate redeclared in this block
database/backfill.go:37:2: other declaration of BackfillImmediate
database/backfillqueue.go:38:2: BackfillForward redeclared in this block
database/backfill.go:38:2: other declaration of BackfillForward
database/backfillqueue.go:39:2: BackfillDeferred redeclared in this block
database/backfill.go:39:2: other declaration of BackfillDeferred
database/backfillqueue.go:42:24: method BackfillType.String already declared at database/backfill.go:42:24
database/backfillstate.go:27:22: *BackfillState does not satisfy dbutil.DataStruct[*BackfillState] (wrong type for method Scan)
have Scan(dbutil.Scannable) *BackfillState
want Scan(dbutil.Scannable) (*BackfillState, error)
database/backfillstate.go:67:6: BackfillState redeclared in this block
database/backfill.go:285:6: other declaration of BackfillState
database/backfillstate.go:77:25: method BackfillState.Scan already declared at database/backfill.go:297:25
database/backfillstate.go:87:25: method BackfillState.Upsert already declared at database/backfill.go:308:25
database/backfillstate.go:91:25: method BackfillState.SetProcessingBatch already declared at database/backfill.go:324:25
database/backfillstate.go:27:22: too many errors

I tried below command and no luck.

sudo rm -rf /usr/local/go
go clean -modcache
wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz

Can anyone help me to fix this issue.