golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.93k stars 17.66k forks source link

x/crypto: update go directive to at least 1.20 #68035

Closed diarmp closed 4 months ago

diarmp commented 4 months ago

Go version

go 1.19

Output of go env in your module/workspace:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Lenovo\AppData\Local\go-build
set GOENV=C:\Users\Lenovo\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Lenovo\Documents\www\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Lenovo\Documents\www\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\laragon\bin\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\laragon\bin\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Lenovo\Documents\www\go\gin\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\Lenovo\AppData\Local\Temp\go-build683410081=/tmp/go-build -gno-record-gcc-switches

What did you do?

im install fresh gin framework and only create main.go with code

package main

import "github.com/gin-gonic/gin"

func main() {
    r := gin.Default()
    r.GET("/ping", func(c *gin.Context) {
        c.JSON(200, gin.H{
            "message": "pong",
        })
    })
    r.Run() // listen and serve on 0.0.0.0:8080
}

go run main.go and i got this error

What did you see happen?

# golang.org/x/crypto/sha3
..\pkg\mod\golang.org\x\crypto@v0.24.0\sha3\xor.go:25:10: undefined: subtle.XORBytes

What did you expect to see?

# golang.org/x/crypto/sha3
..\pkg\mod\golang.org\x\crypto@v0.24.0\sha3\xor.go:25:10: undefined: subtle.XORBytes
gabyhelp commented 4 months ago

Similar Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

seankhliao commented 4 months ago

1.19 is no longer a supported version of go, please update.

dr2chase commented 4 months ago

Works fine with 1.21, 1.22, and 1.23-not-quite-RC1.