Go — go.mod file getting upadated when running go mod tidy

I have the following go.mod file. I’m unable to run the module as the compiler in VSCode asks me to run go mod tidy. When I run go mod tidy my go.mod file gets updated with go version getting bumped from 1.19 to 1.21, and a new toolchain go1.22.1 line added. go.sum file is also getting updated.

This behaviour is only happening for me and not for my colleagues (for the exactly same go.mod file), indicating that something is wrong with my setup.

Running go mod tidy -go=1.19 gives the following error — go: google.golang.org/[email protected] requires [email protected], but 1.19 is requested

I am confused so as to why this is happening, and what can I do to stop this behaviour

go.mod file :

module product-api

go 1.19

require (
    cloud.google.com/go/pubsub v1.37.0
    github.com/DataDog/datadog-go/v5 v5.2.0
    github.com/fermatcommerce/fermat/go/common v0.0.0-20220906110310-ef66faa0b8db
    github.com/fermatcommerce/fermat/go/product-svc v0.0.0-00010101000000-000000000000
    github.com/fermatcommerce/fermat/proto/product-service/go v0.0.0-00010101000000-000000000000
    github.com/go-chi/chi/v5 v5.0.8
    github.com/go-chi/cors v1.2.1
    github.com/google/uuid v1.6.0
    github.com/lib/pq v1.10.6
    github.com/shopspring/decimal v1.3.1
    github.com/stretchr/testify v1.8.4
    go.uber.org/zap v1.24.0
    golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
    google.golang.org/protobuf v1.34.2
)

require (
    cloud.google.com/go v0.112.1 // indirect
    cloud.google.com/go/cloudsqlconn v0.5.1 // indirect
    cloud.google.com/go/compute/metadata v0.3.0 // indirect
    cloud.google.com/go/iam v1.1.6 // indirect
    github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
    github.com/Microsoft/go-winio v0.5.2 // indirect
    github.com/Microsoft/hcsshim v0.9.4 // indirect
    github.com/cenkalti/backoff/v4 v4.1.3 // indirect
    github.com/containerd/cgroups v1.0.4 // indirect
    github.com/containerd/containerd v1.6.8 // indirect
    github.com/davecgh/go-spew v1.1.1 // indirect
    github.com/docker/distribution v2.8.1+incompatible // indirect
    github.com/docker/docker v20.10.17+incompatible // indirect
    github.com/docker/go-connections v0.4.0 // indirect
    github.com/docker/go-units v0.5.0 // indirect
    github.com/felixge/httpsnoop v1.0.4 // indirect
    github.com/go-logr/logr v1.4.1 // indirect
    github.com/go-logr/stdr v1.2.2 // indirect
    github.com/gogo/protobuf v1.3.2 // indirect
    github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
    github.com/golang/protobuf v1.5.4 // indirect
    github.com/google/s2a-go v0.1.7 // indirect
    github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
    github.com/googleapis/gax-go/v2 v2.12.2 // indirect
    github.com/jackc/pgpassfile v1.0.0 // indirect
    github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
    github.com/jackc/pgx/v4 v4.17.0 // indirect
    github.com/jackc/pgx/v5 v5.5.2 // indirect
    github.com/jackc/puddle/v2 v2.2.1 // indirect
    github.com/magiconair/properties v1.8.6 // indirect
    github.com/moby/sys/mount v0.3.3 // indirect
    github.com/moby/sys/mountinfo v0.6.2 // indirect
    github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
    github.com/morikuni/aec v1.0.0 // indirect
    github.com/opencontainers/go-digest v1.0.0 // indirect
    github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
    github.com/opencontainers/runc v1.1.3 // indirect
    github.com/pkg/errors v0.9.1 // indirect
    github.com/pmezard/go-difflib v1.0.0 // indirect
    github.com/rogpeppe/go-internal v1.12.0 // indirect
    github.com/sirupsen/logrus v1.8.1 // indirect
    github.com/testcontainers/testcontainers-go v0.15.0 // indirect
    go.opencensus.io v0.24.0 // indirect
    go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
    go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
    go.opentelemetry.io/otel v1.24.0 // indirect
    go.opentelemetry.io/otel/metric v1.24.0 // indirect
    go.opentelemetry.io/otel/trace v1.24.0 // indirect
    go.uber.org/atomic v1.10.0 // indirect
    go.uber.org/multierr v1.9.0 // indirect
    golang.org/x/crypto v0.23.0 // indirect
    golang.org/x/net v0.25.0 // indirect
    golang.org/x/oauth2 v0.20.0 // indirect
    golang.org/x/sync v0.7.0 // indirect
    golang.org/x/sys v0.20.0 // indirect
    golang.org/x/text v0.15.0 // indirect
    golang.org/x/time v0.5.0 // indirect
    google.golang.org/api v0.169.0 // indirect
    google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
    google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
    google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
    google.golang.org/grpc v1.65.0 // indirect
    gopkg.in/yaml.v3 v3.0.1 // indirect
)

go env returns the following

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/tanmay/Library/Caches/go-build'
GOENV='/Users/tanmay/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/tanmay/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/tanmay/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.1/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.1/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/tanmay/Desktop/fermat/go/product-api/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/tk/g6yl6ybj5gz764nfsh8zrfh00000gn/T/go-build2365762375=/tmp/go-build -gno-record-gcc-switches -fno-common'

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật