profile
viewpoint

golang/tour 1071

[mirror] A Tour of Go

BIMIB-DISCo/TRONCO 14

Repository of the TRanslational ONCOlogy library, which includes various algorithms (such as CAPRESE and CAPRI) and the Pipeline for Cancer Inference (PICNIC). Website: https://sites.google.com/site/troncopackage/

ALTree/bigfloat 12

Additional operations for the standard library big.Float type

ALTree/microsmith 6

A fuzzer that generates random (but valid) Go programs

ALTree/bio-ensembl-rest 2

A Ruby library for the RESTful Ensembl API.

ALTree/ruby-number-theory 2

A number theory library written in pure Ruby.

luca-dex/shiny-octo-dubstep 2

Fractal Image Compression

ALTree/dep 0

Go dependency management tool

ALTree/PLISCuda 0

PLIS on CUDA

ALTree/progetto-dct 0

dct2 su bmp

issue closedgolang/go

Cross comiple static library for linux-mips

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version go version go1.13.4 linux/amd64 </pre>

Does this issue reproduce with the latest release?

YES

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/TYAndroid/.cache/go-build" GOENV="/home/TYAndroid/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/TYAndroid/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go-1.13" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build487958631=/tmp/go-build -gno-record-gcc-switches" </pre></details>

<details><summary><code>cross compile go env</code> Output</summary><br><pre> $ CGO_ENABLED=1 CC="/home/TYAndroid/toolChains/opt/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-gnu-gcc" CXX="/home/TYAndroid/toolChains/opt/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-gnu-g++" GOPATH="/home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go" GOOS=linux GOARCH=mips CGO_CFLAGS="-I/home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/sqlcipher/include/sqlcipher" CGO_LDFLAGS="-g -O2 /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/sqlcipher/libs/mips/libsqlcipher.a /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/openssl/libs/mips/libcrypto.a -ldl /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../output/mips/ipc/go/glue_c.o" go env GO111MODULE="" GOARCH="mips" GOBIN="" GOCACHE="/home/TYAndroid/.cache/go-build" GOENV="/home/TYAndroid/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go-1.13" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64" GCCGO="gccgo" GOMIPS="hardfloat" AR="ar" CC="/home/TYAndroid/toolChains/opt/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-gnu-gcc" CXX="/home/TYAndroid/toolChains/opt/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-gnu-g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-I/home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/sqlcipher/include/sqlcipher" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2 /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/sqlcipher/libs/mips/libsqlcipher.a /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../third_party/openssl/libs/mips/libcrypto.a -ldl /home/TYAndroid/Personal/rqg/ai_pad_sdk_hisilicon/src/go/../../output/mips/ipc/go/glue_c.o" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -mabi=32 -march=mips32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build647522201=/tmp/go-build -gno-record-gcc-switches" </pre></details>

What did you do?

Cross comiple static library for linux-mips

What did you expect to see?

Build success

What did you see instead?

<details><summary><code>CGO_ENABLED=1 GOOS=linux GOARCH=mips go build -buildmode=c-archive</code> Output</summary><br><pre>

/usr/lib/go-1.13/pkg/tool/linux_amd64/asm -trimpath "$WORK/b087=>" -I $WORK/b087/ -I /usr/lib/go-1.13/pkg/include -D GOOS_linux -D GOARCH_mips -shared -D GOMIPS_hardfloat -gensymabis -o $WORK/b087/symabis ./asm_mipsx.s cat >$WORK/b087/importcfg << 'EOF' # internal # import config EOF /usr/lib/go-1.13/pkg/tool/linux_amd64/compile -o $WORK/b087/pkg.a -trimpath "$WORK/b087=>" -shared -p runtime/cgo -std -installsuffix shared -buildid 58OGoR3cGwa5mSwzdK-t/58OGoR3cGwa5mSwzdK-t -goversion go1.13.4 -symabis $WORK/b087/symabis -D "" -importcfg $WORK/b087/importcfg -pack -asmhdr $WORK/b087/go_asm.h ./callbacks.go ./callbacks_traceback.go ./iscgo.go ./setenv.go $WORK/b087/_cgo_gotypes.go $WORK/b087/cgo.cgo1.go $WORK/b087/_cgo_import.go # runtime/cgo flag provided but not defined: -shared usage: compile [options] file.go... -% debug non-static initializers -+ compiling runtime -B disable bounds checking -C disable printing of columns in error messages -D path set relative path for local imports -E debug symbol export -I directory add directory to import search path -K debug missing line numbers -L show full file names in error messages -N disable optimizations -S print assembly listing -V print version and exit -W debug parse tree after type checking -asmhdr file write assembly header to file -bench file append benchmark times to file -blockprofile file write block profile to file -buildid id record id as the build id in the export metadata -c int concurrency during compilation, 1 means no concurrency (default 1) -complete compiling complete package (no C or assembly) -cpuprofile file write cpu profile to file -d list print debug information about items in list; try -d help -dwarf generate DWARF symbols (default true) -dwarfbasentries use base address selection entries in DWARF (default true) -dwarflocationlists add location lists to DWARF in optimized mode (default true) -e no limit on number of errors reported -gendwarfinl int generate DWARF inline info records (default 2) -goversion string required version of the runtime -h halt on error -importcfg file read import configuration from file -importmap definition add definition of the form source=actual to import map -installsuffix suffix set pkg directory suffix -j debug runtime-initialized variables -l disable inlining -lang string release to compile for -linkobj file write linker-specific object to file -live debug liveness analysis -m print optimization decisions -memprofile file write memory profile to file -memprofilerate rate set runtime.MemProfileRate to rate -mutexprofile file write mutex profile to file -newescape enable new escape analysis (default true) -nolocalimports reject local (relative) imports -o file write output to file -p path set expected package import path -pack write to file.a instead of file.o -r debug generated wrappers -s warn about composite literals that can be simplified -smallframes reduce the size limit for stack allocated objects -std compiling standard library -symabis file read symbol ABIs from file -traceprofile file write an execution trace to file -trimpath prefix remove prefix from recorded source file paths -v increase debug verbosity -w debug type checking -wb enable write barrier (default true) </pre></details>

<details><summary><code>/usr/lib/go-1.13/pkg/tool/linux_amd64/compile</code> Output</summary><br><pre> $ /usr/lib/go-1.13/pkg/tool/linux_amd64/compile usage: compile [options] file.go... -% debug non-static initializers -+ compiling runtime -B disable bounds checking -C disable printing of columns in error messages -D path set relative path for local imports -E debug symbol export -I directory add directory to import search path -K debug missing line numbers -L show full file names in error messages -N disable optimizations -S print assembly listing -V print version and exit -W debug parse tree after type checking -asmhdr file write assembly header to file -bench file append benchmark times to file -blockprofile file write block profile to file -buildid id record id as the build id in the export metadata -c int concurrency during compilation, 1 means no concurrency (default 1) -complete compiling complete package (no C or assembly) -cpuprofile file write cpu profile to file -d list print debug information about items in list; try -d help -dwarf generate DWARF symbols (default true) -dwarfbasentries use base address selection entries in DWARF (default true) -dwarflocationlists add location lists to DWARF in optimized mode (default true) -dynlink support references to Go symbols defined in other shared libraries -e no limit on number of errors reported -gendwarfinl int generate DWARF inline info records (default 2) -goversion string required version of the runtime -h halt on error -importcfg file read import configuration from file -importmap definition add definition of the form source=actual to import map -installsuffix suffix set pkg directory suffix -j debug runtime-initialized variables -l disable inlining -lang string release to compile for -linkobj file write linker-specific object to file -live debug liveness analysis -m print optimization decisions -memprofile file write memory profile to file -memprofilerate rate set runtime.MemProfileRate to rate -msan build code compatible with C/C++ memory sanitizer -mutexprofile file write mutex profile to file -newescape enable new escape analysis (default true) -nolocalimports reject local (relative) imports -o file write output to file -p path set expected package import path -pack write to file.a instead of file.o -r debug generated wrappers -race enable race detector -s warn about composite literals that can be simplified -shared generate code that can be linked into a shared library -smallframes reduce the size limit for stack allocated objects -std compiling standard library -symabis file read symbol ABIs from file -traceprofile file write an execution trace to file -trimpath prefix remove prefix from recorded source file paths -v increase debug verbosity -w debug type checking -wb enable write barrier (default true) </pre></details>

Guess

'-shared' flag seems be removed when cross compile mips static library

Does golang support cross compile mips static library ?

closed time in an hour

fantasyRqg

issue commentgolang/go

Cross comiple static library for linux-mips

This is tracked at #21222. Reading the latest message, it seems that someone has been working on it, but it hasn't yet been committed. I'm closing here, feel free to subscribe to that thread for updates.

fantasyRqg

comment created time in an hour

issue closedgolang/go

How do I update the module-dependent version of go?

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version go version go1.14 darwin/amd64 </pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/Users/jinxiaozhang/Library/Caches/go-build" GOENV="/Users/jinxiaozhang/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GONOPROXY="github.com/JokerDevops/supervisorctl-cli.go" GONOSUMDB="github.com/JokerDevops/supervisorctl-cli.go" GOOS="darwin" GOPATH="/Users/jinxiaozhang/go" GOPRIVATE="github.com/JokerDevops/supervisorctl-cli.go" GOPROXY="https://goproxy.cn,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_q/wjnpyt252pd8vgfy5mrmqkt80000gp/T/go-build642781873=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details>

What did you do?

go get github.com/thedevsaddam/gojsonq@v2.5.0

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

Download the module version I need correctly

What did you see instead?

go get github.com/thedevsaddam/gojsonq@v2.5.0: github.com/thedevsaddam/gojsonq@v2.5.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

closed time in an hour

JokerDevops

issue commentgolang/go

How do I update the module-dependent version of go?

Hi,

the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.

Please see the Questions wiki page; it has a list of good places for asking questions. Thanks!

Closing here, since this is not a bug.

JokerDevops

comment created time in an hour

issue commentgolang/go

fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

@dFionov thanks. This will be hard to investigate without a (smallish) reproducer. The most likely explanation for the crash is incorrect unsage or cgo usage in one of your dependencies, or a data race in your application.

I assume that running it with the race detector enabled (go [run/test/build] -race ...) does not print any warning?

dFionov

comment created time in 3 hours

issue commentgolang/go

fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

PS. We reviewed carefully all changes between this two builds(actually it was ~100 loc) no unsafe or cgo usages were added

Does the application in general use unsafe and cgo?

dFionov

comment created time in 3 hours

issue commentgolang/go

runtime: with GDB, callstack falls into infinite loop with CGO on GOOS=linux GOARCH=arm64

@shawn-xdji I see no assignee and no gerrit change, so I assume nobody is working on this. Feel free to take it.

iswade

comment created time in 3 hours

issue commentgolang/go

cmd/compile: add a way to declare variables in rewrite rules

The fundamental issue here is that we started with a LISP-like parenthesized prefix notation for the rules, but then tried to bolt on more syntax that departed from the S-expressions ways of writing things.

I think adding even more may be a mistake. If anything, I would move back to a more regular (and easier to write a parser for!) prefix notation.

I understand that many people don't like the LISP fully-parenthesized notation, but this weird mix of prefix/infix is starting to show its limitations.

josharian

comment created time in 3 hours

issue commentgolang/go

math/big panic in big.ParseFloat (off by one access)

Thanks for reporting this issue.

This is a Go1.14 regression, introduced by CL 172018 (math/big: implement recursive algorithm for division).

cc @remyoudompheng @griesemer

catenacyber

comment created time in a day

issue closedgolang/go

cmd/go: unable to use network drive on Windows Subsystem for Linux since go 1.14

What version of Go are you using (go version)?

<pre> $ go version go version go1.14 windows/amd64 </pre>

Does this issue reproduce with the latest release?

It is the last release

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env set GO111MODULE=on set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\a\AppData\Local\go-build set GOENV=C:\Users\a\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= -mod= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\a\go set GOPRIVATE= set GOPROXY=direct set GOROOT=C:\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=Z:\home\a\go\graph\go.mod 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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\a\AppData\Local\Temp\go-build115528494=/tmp/go-build -gno-record-gcc-switches

</pre></details>

What did you do?

I'm using Windows Subsystem for Linux 2 and I access my files using a network driver. I tried to use go mod init in a new project and got this error :

a@Hackintosh-Windows MINGW64 /z/home/a/go/graph
$ go mod init graph
go: creating new go.mod: module graph
go: updating go.mod: Lock Z:\home\a\go\graph\go.mod: Fonction incorrecte.

(Fonction incorrecte means incorrect/invalid function)

Then i tried to create it by end with the content :

module graph

go 1.14

Running go list -m (or any command requiring this file actually) gives me this error : go: RLock Z:\home\a\go\graph\go.mod: Fonction incorrecte.

What did you expect to see?

my go.mod file created.

What did you see instead?

An error about Lock/RLock.

More information:

After reinstalling go 1.13.8, i had everything working back.

closed time in 2 days

JulienTant

issue commentgolang/go

cmd/go: unable to use network drive on Windows Subsystem for Linux since go 1.14

Thanks for the report.

The Windows Subsystem for Linux is not a supported platform. The fact that it accidentally worked on Go1.13 does not necessarily mean that it will keep working going forward. We don't have a builder (since it's not a supported platform), so breakage may happen.

I'm closing this issue, but please feel free to comment if you can reproduce this on plain Windows or on Linux; and we'll re-open.

JulienTant

comment created time in 2 days

push eventALTree/microsmith

Alberto Donizetti

commit sha c8d78a69a86ff86cc537d8366b07a354d529059d

common: pre-allocate string literals We don't need that much randomness.

view details

Alberto Donizetti

commit sha c736d6510358cb1eab0199efa3ad746fcf8b655e

all: generate named func parameters and use them

view details

Alberto Donizetti

commit sha 8b8ac33b67b4178ef6304cb45a0e477527a12e18

stmt: small cleanups

view details

Alberto Donizetti

commit sha 64723b0fd18d3e115d3b267b29c1f40d5043bf8c

expr: small cleanups

view details

push time in 3 days

issue closedgolang/tour

tour: methods/25 fails

Context: https://tour.golang.org/methods/25

Run example and get error: go: finding golang.org/x/tour latest go: downloading golang.org/x/tour v0.0.0-20200201212631-8f38c9a8d074 go: extracting golang.org/x/tour v0.0.0-20200201212631-8f38c9a8d074 ./prog.go:9:15: cannot use m (type Image) as type image.Image in argument to pic.ShowImage: Image does not implement image.Image (missing At method)

closed time in 3 days

ivhome

issue commentgolang/tour

tour: methods/25 fails

Hi,

that page is an exercise. The title is "Exercise: Images" and it says:

Define your own Image type, implement the necessary methods, and call pic.ShowImage.

It won't compile until you solve the exercise correctly.

Closing here.

ivhome

comment created time in 3 days

issue commentgolang/go

go.dev: Provide options for sorting search results by number of imports and stars on GitHub

This is very similar to #36952 (there they are asking for a default, your are asking for options, but it's the same UX area). It would probably be better to post your suggestion in that thread.

mewmew

comment created time in 3 days

issue closedgolang/go

Incorrect Install Information on Main Website

The official documentation on the main website is grossly out of date: https://golang.org/doc/install#testing

What did you expect to see?

Simpler documentation suitable for the current version of go1.13+

What did you see instead?

It's instructing users to set GOPATH and place code inside of it... which will only lead to frustration and sadness.

Create your workspace directory, $HOME/go. (If you'd like to use a different directory, you will need to set the GOPATH environment variable.)

closed time in 3 days

solderjs

issue commentgolang/go

Incorrect Install Information on Main Website

Thanks for reporting this.

The issue was tracked at #37042 and it has already been fixed in the version that will come with Go1.14, you can see a preview here: https://tip.golang.org/doc/install#testing

Closing here.

solderjs

comment created time in 3 days

issue commentgolang/go

Invalid tool command or web page or both?

go tool api in not shipped in the pre-compiled binaries we have on the download page, you only get it if you build Go from the git repository. See #13030.

ronaldpetty

comment created time in 3 days

pull request commentgolang/dep

README: clarify current status of Go dependency management

Ping for review.

ALTree

comment created time in 4 days

push eventALTree/microsmith

Alberto Donizetti

commit sha 160c991a40e282cd495d0365f279f97d750389b8

all: remove ExprKindChance It doesn't seem particularly useful and we still need to have a bunch of workarounds (e.g. even if only Unary is enabled we still generate Binary for strings, and even if only FuncCalls are enabled we still generate Binary if a Func with the required type is not in scope). Also fix a bug in the driver in the BuildDeps code.

view details

push time in 4 days

issue closedgolang/go

x/net/http2:

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version

</pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

What did you see instead?

closed time in 4 days

c3p01pl

issue commentgolang/go

x/net/http2:

Empty issue, closing.

c3p01pl

comment created time in 4 days

issue closedgolang/go

Go get not working

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version go version go1.13.8 windows/amd64 </pre>

Does this issue reproduce with the latest release?

don't know

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\my\AppData\Local\go-build set GOENV=C:\Users\my\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=E:\myProj set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=c:\go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=c:\go\pkg\tool\windows_amd64 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD= 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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\saloni\AppData\Local\Temp\go-build955997130=/tmp/go-build -gno-record-gcc-switches

</pre></details>

What did you do?

go get github.com/gorilla/websocket <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

install successfully

What did you see instead?

go get github.com/gorilla/websocket
# cd .; git clone -- https://github.com/gorilla/websocket E:\myProj\src\github.com\gorilla\websocket
Cloning into 'E:\myProj\src\github.com\gorilla\websocket'...
fatal: unable to access 'https://github.com/gorilla/websocket/': getaddrinfo() thread failed to start

package github.com/gorilla/websocket: exit status 128

closed time in 4 days

saloni61

issue commentgolang/go

Go get not working

Hi,

this is an issue with git and your internet connection, not a Go problem. See for example: https://stackoverflow.com/questions/59517290/getting-access-denied-while-cloning-using-git-clone-command

Closing here, since this is not a Go bug.

saloni61

comment created time in 4 days

issue openedgolang/go

cmd/go: TestScript/list_ambiguous_path test fails when Windows language is not english

$ go version
go version devel +ebe49b2c29 Sun Feb 23 01:23:41 2020 +0000 windows/amd6

The TestScript/list_ambiguous_path test in cmd/go fails when the Windows language is set to something different from English because the test hardcodes the missing file error message, which is localized.

An example failure from a system with the language set to Italian:

--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/list_ambiguous_path (0.36s)
        script_test.go:193:
            # Ensures that we can correctly list package patterns ending in '.go'.
            # See golang.org/issue/34653.
            # A single pattern for a package ending in '.go'. (0.060s)
            # Multiple patterns for packages including one ending in '.go'. (0.057s)
            # A single pattern for a Go file. (0.144s)
            # A single typo-ed pattern for a Go file. This should
            # treat the wrong pattern as if it were a package. (0.049s)
            # Multiple patterns for Go files with a typo. This should
            # treat the wrong pattern as if it were a non-existint file. (0.035s)
            > ! go list ./foo.go/a.go ./foo.go/b.go
            [stderr]
            CreateFile ./foo.go/b.go: Impossibile trovare il file specificato.
            [exit status 1]
            > [plan9] stderr 'stat ./foo.go/b.go: ''./foo.go/b.go'' does not exist'
            > [windows] stderr './foo.go/b.go: The system cannot find the file specified'
            FAIL: testdata\script\list_ambiguous_path.txt:26: no match for `(?m)./foo.go/b.go: The system cannot find the file specified` found in stderr
 
FAIL
FAIL    cmd/go  229.859s

This test is run by all.bat, which means that all.bat will not complete successfully on a non-english Windows machine.

cc @Helcaraxan (which added the test) and @bcmills

created time in 5 days

push eventALTree/microsmith

Alberto Donizetti

commit sha 8d8db9f3dea37396b3728a863283fc8239d9f392

main: fix wasm goos in installDeps

view details

push time in 6 days

push eventALTree/microsmith

Alberto Donizetti

commit sha c6f15246d1ce2715c34b84cbbe71785553104aed

main: only install deps when fuzzing gc

view details

push time in 6 days

issue closedgolang/go

x/website: download the archive link points to generic download page

Thank you in advance!

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

Not applicable.

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

Fedora 31 on amd64

What did you do?

I tried to copy the link from here; specifically, where it says "Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go". The "Download the archive" portion is a hyperlink to the Go tarball.

What did you expect to see?

I expected for the hyperlink to be "https://dl.google.com/go/go1.13.8.linux-amd64.tar.gz" instead of "https://golang.org/dl/".

What did you see instead?

The "Download the archive" hyperlink resolves to "https://golang.org/dl/" and not "https://dl.google.com/go/go1.13.8.linux-amd64.tar.gz".

closed time in 7 days

nickgerace

issue commentgolang/go

x/website: download the archive link points to generic download page

No problem and thanks for following up. Closing.

nickgerace

comment created time in 7 days

issue closedgolang/go

expected operand, found '}'

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

go1.13.6

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

C:\Users\wcfuser\go\src\tests>go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\wcfuser\AppData\Local\go-build
set GOENV=C:\Users\wcfuser\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\wcfuser\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\wcfuser\AppData\Local\Temp\go-build969063194=/tmp/go-build -gno-record-gcc-switches

What did you do?

Trying to understand an error that I'm seeing. I'm new to go. Trying to learn it and setup an automation framework using selenium and godog. I ran the following and received the following error:

login_test.go:30:1: expected operand, found '}'

func FeatureContext(s *godog.Suite) {
    s.Step(`^I enter a username and password for a North Carolina Dealer$`, (*pages.LoginPage.EnterUsernameAndPassword),
	s.Step(`^I click Login Button$`, (*pages.LoginPage).ClickLoginButton),
	s.Step(`^I click New Application Button$`, (*pages.DealerHomePage).ClickNewAppButton),
	s.Step(`^I click Begin App Button$`, (*pages.LTOIntroPage).ClickBeginAppButton),
	s.Step(`^I fill out the Personal Info Form$`, (*pages.PersonalInfoPage).FillOutPersonalInfoForm),

}

That last closing bracket is on line 30.

What did you expect to see?

What did you see instead?

login_test.go:30:1: expected operand, found '}'

closed time in 8 days

dmholb01

issue commentgolang/go

expected operand, found '}'

You have a mismatched (. You need to add a closing ) either at the end of the fist s.Step line (and remove all the ,); or at end end of the function body.

Closing here, since this is not a Go bug.

dmholb01

comment created time in 8 days

push eventALTree/microsmith

Alberto Donizetti

commit sha f4f8338e5c3c81997a9e38a62ffe34e0daf73f3d

decl: actually generate func call in RandConf

view details

Alberto Donizetti

commit sha ee266ef387c04d1894418f7fbe53840e4325b219

types: generate func with > 0 args

view details

push time in 8 days

issue openedgolang/go

hash/maphash: confusing Reset documentation

The new hash/maphash package has a Reset method documented as:

Reset discards all bytes added to h. (The seed remains the same.)

Moreover, the Sum64 doc says:

Sum64 returns h's current 64-bit value, which depends on h's seed and the sequence of bytes added to h since the last call to Reset

So it appears it would be reasonable to expect this to print two times the same value:

package main

import (
	"fmt"
	"hash/maphash"
)

func main() {
	h := new(maphash.Hash)

	h.WriteString("hello")
	fmt.Printf("%#x\n", h.Sum64())

	h.Reset()

	h.WriteString("hello")
	fmt.Printf("%#x\n", h.Sum64())
}

But it doesn't:

$ gotip run hash.go
0xdf1aabcc36e56272
0x5a04b54a5a2174d6

This is because even if the seed remains the same and "all the previously added bytes are discarded", the internal state of the Hash is maintained, even after the h.Reset() call.

Is this the desired behaviour? If it is, the documentation should probably be amended to make it clear what to expect after a call to the Reset method.

cc @alandonovan @randall77

created time in 8 days

issue commentgolang/go

x/website:

Hi,

well, the link on "Download the archive" points to the generic dl page because pointing to the linux/amd64 archive would be wrong for anyone not running linux on amd64, right? I'm not sure why you'd expect the link to point to the linux/amd64 archive. Have I misunderstood your report?

nickgerace

comment created time in 8 days

issue closedgolang/go

golang alpine docker image should include git

Since go mod needs git to download private libraries, such as gitlab, do you consider adding git to docker golang alpine?

What version of Go are you using (go version)?

<pre> $ go version docker: golang:1.13-alpine </pre>

What did you do?

There is a go mod project that references the gitlab private library. When I execute go build, it prompts an error.

What did you expect to see?

go: downloading gitlab.srxcloud.com/test-group/utils v0.0.1
go: extracting gitlab.srxcloud.com/test-group/utils v0.0.1
go: finding gitlab.srxcloud.com/test-group/utils v0.0.1

What did you see instead?

go: gitlab.srxcloud.com/test-group/utils@v0.0.1: git init --bare in /go/pkg/mod/cache/vcs/4057063b4e5edfa5f3fcb02ce9e41e5fbddacd674d24e08a9780bd04e1bc7d74: exec: "git": executable file not found in $PATH

closed time in 8 days

relax-admin

issue commentgolang/go

golang alpine docker image should include git

Hi,

we don't control or distribute the Go docker images, so you should file an issue in the docker image issue tracker, here: https://github.com/docker-library/golang

In any case, someone already did file an issue asking for git: https://github.com/docker-library/golang/issues/297.

Closing here, since this is not an issue related to the Go Project.

relax-admin

comment created time in 8 days

push eventALTree/microsmith

Alberto Donizetti

commit sha 83e547bb9214915ba47e23a9748805124bc071e5

stmt: remove MaxBlockStmts

view details

Alberto Donizetti

commit sha 1e17ae0e60eb088f88787ae83635a536745e25a7

scope: only loop on the scope once when looking for vars name old time/op new time/op delta Program-2 1.08ms ± 4% 1.00ms ± 4% -7.19% (p=0.000 n=20+20) name old alloc/op new alloc/op delta Program-2 239kB ± 3% 239kB ± 3% ~ (p=0.821 n=18+18) name old allocs/op new allocs/op delta Program-2 5.95k ± 3% 5.95k ± 3% ~ (p=1.000 n=19+19)

view details

Alberto Donizetti

commit sha b5a20847300f7b63b24b70ba9d8d3325909c478c

scope: don't allocate when looking for a func name old time/op new time/op delta Program-2 1.00ms ± 4% 0.94ms ± 4% -6.14% (p=0.000 n=20+20) name old alloc/op new alloc/op delta Program-2 239kB ± 3% 219kB ± 3% -8.32% (p=0.000 n=18+20) name old allocs/op new allocs/op delta Program-2 5.95k ± 3% 5.53k ± 3% -7.10% (p=0.000 n=19+20)

view details

Alberto Donizetti

commit sha 79b43997a8b82d3a7d3da2e4f348344061cbaf37

stmt: make basic types a little more likely

view details

Alberto Donizetti

commit sha 52043145ddb71d8b774998c858100ae0acbb6c29

stmt: make basic types more like, use BlockStmt for switch

view details

push time in 9 days

issue closedgolang/go

Iterate go routine with an anonymous function

What version of Go are you using (go version)?

--> go version go1.13 darwin/amd64

Does this issue reproduce with the latest release?

--> Yes

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/gonyi/Library/Caches/go-build" GOENV="/Users/gonyi/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GONOPROXY="github.com/gonyyi" GONOSUMDB="github.com/gonyyi" GOOS="darwin" GOPATH="/Users/gonyi/go" GOPRIVATE="github.com/gonyyi" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jn/9zs9p73j7_gf3mzpdx4frmmd_05z01/T/go-build626678608=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details>

What did you do?

work := []string{"1mail", "2commute", "3coding", "4debugging", "5coffee"}
for _, v := range work {
	go func(){
		fmt.Println(v)
	}()
}

I was doing simple iteration of work thru channel with go routine. I was expect WORK function will receive those 5 items, however, it was repeating likely last item in the work slice as below.

5coffee
5coffee
5coffee
5coffee
5coffee

But, instead of having anonymous in for-loop, if I call outside function, it gives expected result:

work := []string{"1homework", "2commute", "3coding", "4debugging", "5coffee"}
for _, v := range work {
	go fmt.Println(v)
	//go func(){
	//	fmt.Println(v)
	//}()
}

I think this is by the design, but I wonder if it makes more sense to have identical result..

What did you expect to see?

1homework
4debugging
5coffee
2commute
3coding

What did you see instead?

5coffee
5coffee
5coffee
5coffee
5coffee

closed time in 9 days

gonyyi

issue commentgolang/go

Iterate go routine with an anonymous function

Hi,

the difference is that your first snippet is go-running a closure, while the second is not. (and the Printf argument is evaluated immediately, even if the function is called later).

See: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables

This is unlikely to change, so I'm closing this issue.

gonyyi

comment created time in 9 days

issue closedgolang/go

Sandbox Process

Screenshot_20200218-153026_YouTube Screenshot_20200218-144741_X-plore Screenshot_20200218-153022_YouTube Screenshot_20200218-144318_Google Play services 1582088164792 Screenshot_20200218-153014_YouTube Screenshot_20200218-144314_Google Play services Screenshot_20200218-153117_YouTube Screenshot_20200218-144306_Google Play services Screenshot_20200218-153111_YouTube Screenshot_20200218-145045_Google Play services Screenshot_20200217-173208_Google Play services Screenshot_20200218-144245_Google Play services Screenshot_20200218-144239_Google Play services Screenshot_20200218-145039_Google Play services Screenshot_20200218-144233_Google Play services Screenshot_20200218-153054_YouTube Screenshot_20200218-145032_Google Play services Screenshot_20200218-144221_Google Play services Screenshot_20200218-145026_Google Play services Screenshot_20200218-145017_Google Play services Screenshot_20200218-144038_Google Play  #services

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version

</pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

What did you see instead?

closed time in 9 days

ws7789337

issue commentgolang/go

Sandbox Process

This does not seem to be relevant to the Go project. Closing.

ws7789337

comment created time in 9 days

issue closedgolang/tour

Translation error

ITALIAN TOUR.

  1. Here: https://go-tour-ita.appspot.com/basics/11

I tipi int, uint, and uintptr sono grandi normalmente 32 bit su sistemi da 32-bit e 64 bit su sistemi da 64-bit. Quando hai bisogno di un valore intero dovresti usare int a meno che tu non abbia particolari necessità di usare tipi di interi di dimensioni diverse o unsigned.

I think that AND it should be 'e', that is the italian conjunction.

  1. Here: https://go-tour-ita.appspot.com/basics/14

Ma quanto la parte destra contiene una costante numerica non tipizzata, la nuova variabile può essere un int, float64, o complex128 a seconda della precisione del contesto:

I think it's 'quando' . quanto == how much quando == when

Ps: I'm italian-native.

closed time in 10 days

edoardottt

issue commentgolang/tour

Translation error

Ciao,

this issue tracker is only for the official English version of the tour. The tour translations are not directly provided by the Go Project members, they are written, uploaded, and maintained by members of the community.

We don't have commit rights on them, so we cannot fix their issues. What you can do is report the translation issue on the italian tour repository, here: https://github.com/alebaffa/go-tour-ita-trans

I'm closing this issue, since it is unfortunately not actionable.

edoardottt

comment created time in 10 days

issue commentgolang/go

How about fail to build when index out of bounds?

@243083df Even if the compiler can statically prove that the code contains an OOB array access, it cannot refuse to compile the program because nothing in the Language Specification says that that program is not valid, I believe.

243083df

comment created time in 10 days

push eventALTree/microsmith

Alberto Donizetti

commit sha ba8b0f9e48e76bd0252dcfc31e2b5bf2b5e18c3a

all: generate local func

view details

Alberto Donizetti

commit sha d944603164e24a5f131f00fa29bab26400568a05

decl: stop importing math/rand It's not longer used.

view details

Alberto Donizetti

commit sha 9197ea4fdc8b55d09c1ba68b237dd2439da82a85

stmt: always give funcs a body on declaration Also rework the DeclStmt logic to be based on a choosen amount of Decls instead of choosing a random number of variables and then distributing types among them.

view details

Alberto Donizetti

commit sha 8eb1b6032e76195ac542891e64d3b88ae15cf57b

stmt: move depth++ into the Stmt functions

view details

Alberto Donizetti

commit sha 9e4324caecf256016cd7fc2dcf606d29ebe69110

all: small cleanups

view details

push time in 10 days

push eventALTree/microsmith

Alberto Donizetti

commit sha 70eaac265e3d07c8debf7a3dc375099f32897aa5

all: generate runes and range on strings too

view details

Alberto Donizetti

commit sha 74c7442a8813027a67e9eb4c36dff3fad0a4087f

all: small cleanups - Remove resolved TODO - Replace a few Int63n()%2 calls with Intn(2) - Update README with counter

view details

Alberto Donizetti

commit sha c2b35ebb03d9d0639008db0f817a24053841a961

expr: delete ComparisonChance and simplify CanDeepen

view details

Alberto Donizetti

commit sha 265aca39c9f83342d95e821dd9e1c78db019ec62

expr: remove unused IndexChance parameter

view details

Alberto Donizetti

commit sha 01dce76db2098efc1157693b6f82248db4b9698e

expr: remove LiteralChance

view details

push time in 11 days

push eventALTree/microsmith

Alberto Donizetti

commit sha 3f6dc06134ccddd27fcce5d59f1f812e8ffe7b66

main: automatically install arch deps before starting

view details

Alberto Donizetti

commit sha bcff78c8ec50b5106f644a9ff6c82c661dd1c355

decl: put a newline between each generated func

view details

Alberto Donizetti

commit sha 24316c95ffc137ad13ef01d2a2e39562133d90a8

expr: delete commented out code

view details

push time in 14 days

push eventALTree/microsmith

Alberto Donizetti

commit sha a8cdbdffe4808ab473b6fd2af292a08644bb4662

all: log Stmt stats and remove StmtChances

view details

Alberto Donizetti

commit sha 476904f118cdb990d3b2f578e56c7e3a45c1a8ae

expr: make string literal more random Plus a couple of small cleanups in the main driver.

view details

Alberto Donizetti

commit sha 0bbcf7815f323c1643cc3227cbbefd64a6f200f3

stmt: generate range loops

view details

push time in 14 days

issue closedgolang/go

Add install script for Unix-like OS

Installing Go on Unix-like OS seems to be too complicated. If you follow Getting Started install guide this is that you get.

Linux, macOS, and FreeBSD tarballs
Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go. For example:

tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Choose the archive file appropriate for your installation. For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you want is called go1.2.1.linux-amd64.tar.gz.

(Typically these commands must be run as root or through sudo.)

Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin
Note: changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.

Why not make install script which does all of this manual work. This is how I imagine new users should be able to install Go.

curl --proto '=https' --tlsv1.2 -sSf https://sh.golang.org | sh

closed time in 15 days

anjmao

issue commentgolang/go

Add install script for Unix-like OS

Indeed. Closing here as a dup of #23381.

anjmao

comment created time in 15 days

issue closedgolang/go

Plis add properti for "chan"

Plis add in chan properti "IsClosed". This property very simple and not break beckward compability.

closed time in 16 days

prospero78

issue commentgolang/go

Plis add properti for "chan"

Thanks @bontibon, closing as a dup of #30906.

prospero78

comment created time in 16 days

issue commentgolang/go

go.dev: "Report an Issue" link does not work on firefox

Same here. Visiting https://pkg.go.dev/?csp-strict-dynamic=true I see this when I load the page:

Content Security Policy: Ignoring “https://www.gstatic.com” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “https://www.googletagmanager.com” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “https://support.google.com” within script-src: ‘strict-dynamic’ specified
Loading failed for the <script> with source “https://support.google.com/inapp/api.js”.

So the last line is the same as before, and then the same error when clicking on the "Report an Issue" button:

[feedback.js:17:3]
ReferenceError: userfeedback is not defined
kortschak

comment created time in 16 days

issue closedgolang/go

Go version

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version

</pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

What did you see instead?

closed time in 16 days

Prabindhar54

issue commentgolang/go

Go version

Empty issue, closing.

Prabindhar54

comment created time in 16 days

issue closedgolang/go

Golang /go

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

<pre> $ go version

</pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

<!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

What did you see instead?

closed time in 16 days

Prabindhar54

issue commentgolang/go

Golang /go

Empty issue, closing.

Prabindhar54

comment created time in 16 days

issue commentgolang/go

Cannot infer types if one argument (Struct field) is defined

Because what you wrote here:

if I have two variables one defined and other undefined then the := does not identify the defined variable

looks like the example I wrote above. Ignore the scoping stuff, as I said := will ignore the already defined variable, that's the issue here.

saritseal

comment created time in 20 days

issue commentgolang/go

Cannot infer types if one argument (Struct field) is defined

Okay, can you explain better?

saritseal

comment created time in 20 days

IssuesEvent

issue closedgolang/go

Cannot infer types if one argument is defined

<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->

What version of Go are you using (go version)?

go 1.12.6 <pre> $ go version

</pre>

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

"darwin" <details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

if I have two variables one defined and other undefined then the := does not identify the defined variable and results in compile error "non-name fs.err on left side of :=" The line of code is as follows

d, fs.err := fs.client.Collection(fs.CollectionName).Doc(fs.ID).Get(fs.ctx)

In the line above fs is a struct and has been defined. In this case I am receiving it as an argument <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

What did you see instead?

closed time in 20 days

saritseal

issue commentgolang/go

Cannot infer types if one argument is defined

Yeah you can't do this. := will always create new variables. For example, in

	var a int = 1
	{
		a, b := 99, 2
		fmt.Println(a, b)
	}

The a outside the block and the a inside the block are two different variables. Even if you used := for the second assignment, it won't overwrite the outer a, it'll create a new one.

The workaround is writing var d ... and then using = ....

Closing here (see #377).

saritseal

comment created time in 20 days

issue commentgolang/go

go.dev: "Report an Issue" link does not work on firefox

So I tested it with Firefox on Linux on my home connection and it works, but it still doesn't work on the Windows machine I used above (Firefox 72.0.2, no addons).

When I load the page at https://pkg.go.dev, I see these two errors in the console:

[utils.js:35:9]
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src").

[pkg.go.dev:21:1]
Loading failed for the <script> with source “https://support.google.com/inapp/api.js”. 

Then, when I click on "Report an Issue", this other message appears:

[feedback.js:17:3]
ReferenceError: userfeedback is not defined    

    sendFeedback https://pkg.go.dev/static/js/feedback.js?version=2020-02-03t15-29-caa6643937a6319c8059e5a4d2694d02b980e68c:17
kortschak

comment created time in 23 days

issue commentgolang/go

cmd/go: document build constraints in 'go help'

@jayconrod

There's only one reference to the go/build package documentation under go help filetype

This is not true; the feature is pretty clearly documented in the https://golang.org/pkg/go/build section I pasted above.

pjweinb

comment created time in 24 days

issue commentgolang/go

Tests not run after removing // +build windows

This is documented. From https://golang.org/pkg/go/build

If a file's name, after stripping the extension and a possible _test suffix, 
matches any of the following patterns:

*_GOOS
*_GOARCH
*_GOOS_GOARCH

(example: source_windows_amd64.go) where GOOS and GOARCH 
represent any known operating system and architecture values 
respectively, then the file is considered to have an implicit build 
constraint requiring those terms (in addition to any explicit 
constraints in the file). 
pjweinb

comment created time in 24 days

issue commentgolang/go

x/tools/gopls: invalidate metadata after a change to build tags

The build tag in the filename is preventing the test from being run.

pjweinb

comment created time in 24 days

issue commentgolang/go

go.dev: "Report an Issue" link does not work on firefox

Can reproduce on Firefox on windows too. When you click on the button, the console says:

ReferenceError: userfeedback is not defined [feedback.js:17:3]
kortschak

comment created time in 24 days

issue closedgolang/go

time: ISO 8601 template const

What version of Go are you using (go version)?

<pre> $ go version 1.12.9 </pre>

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Mac OS, catalina <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/userx/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/userx/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/userx/myproject/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0z/xvrbhgwn6vx8kfhcgn60bzvw0000gn/T/go-build050042786=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details>

What did you do?

Parsing date to time object in GoLang https://play.golang.org/p/dWcJIGo9K7g

What did you expect to see?

Any predefined const for date in ISO 8601 format

What did you see instead?

I see no predefined const for date objects, only for datetime

I think, it is important to add it, because it's pretty common case when you have just date without time in ISO 8601 format

closed time in 25 days

rbUUbr

issue commentgolang/go

time: ISO 8601 template const

@rbUUbr such package should be a third-party package, I don't think anyone was proposing it for inclusion in the standard library. For this reason, this is probably not the right place to discuss it.

Reading the discussion above, it seems that we are not going to add just a "2006-01-02" constant for ISO 8601 dates in the time package, and providing a bunch of constants for every aspect of ISO 8601 is something that should be implemented as an external package, so I think we can close this issue.

rbUUbr

comment created time in 25 days

issue commentgolang/go

runtime: async preemption support on ARM64 breaks ARM64 on QEMU

@bcmills Ah, funny. I didn't have any memory of the deletion, even though you cc'ed me on the CL. So I guess qemu-user really shouldn't be expected to work smoothly.

kortschak

comment created time in 25 days

issue commentgolang/go

runtime: async preemption support on ARM64 breaks ARM64 on QEMU

We have a very minimal "keep arm/arm64 qemu-user working with go binaries" test that I committed at 5095e5d8e2cec3d6209e733652ead8ddc20fc7c2 (it only runs a hello world). But in general yeah, I don't think anyone has ever made a serious effort to keep qemu-user working and performant.

kortschak

comment created time in 25 days

PR opened golang/dep

Reviewers
README: clarify current status of Go dependency management

This change amends the initial README section to make it clear that

  • the Go project has officially adopted modules as the way to manage dependencies in Go;
  • the Module System is no longer a prototype, and it's ready for production use.

Fixes golang/go#35894

+5 -6

0 comment

1 changed file

pr created time in 25 days

push eventALTree/dep

Alberto Donizetti

commit sha ac31146aa6252203976b55c458b0d261a8f7ce9d

README: clarify current status of Go dependency management This change amends the initial README section to make it clear that - the Go project has officially adopted modules as the way to manage dependencies in Go; - the Module System is no longer a prototype, and it's ready for production use. Fixes golang/go#35894

view details

push time in 25 days

fork ALTree/dep

Go dependency management tool

https://golang.github.io/dep/

fork in 25 days

issue closedgolang/tour

The output is showing wrong values for slice capacity(cap)

Context: https://tour.golang.org/moretypes/15

Change the title above to describe your issue and add your feedback here, including code if necessary

closed time in 25 days

nikhil-francium

issue commentgolang/tour

The output is showing wrong values for slice capacity(cap)

No, this is correct. The runtime is free to allocate more capacity than needed to keep the amortized time to O(1).

Closing here.

nikhil-francium

comment created time in 25 days

issue closedgolang/tour

tour: [REPLACE WITH SHORT DESCRIPTION]

Context: https://tour.golang.org/basics/8

Change the title above to describe your issue and add your feedback here, including code if necessary

closed time in 25 days

UniversalSeeker

issue commentgolang/tour

tour: [REPLACE WITH SHORT DESCRIPTION]

Empty issue, closing.

UniversalSeeker

comment created time in 25 days

issue closedgolang/tour

golang sprintf escapetour: [REPLACE WITH SHORT DESCRIPTION]

Context: https://tour.golang.org/flowcontrol/1

Change the title above to describe your issue and add your feedback here, including code if necessary

closed time in 25 days

dutchcodeP

issue commentgolang/tour

golang sprintf escapetour: [REPLACE WITH SHORT DESCRIPTION]

Empty issue, closing.

dutchcodeP

comment created time in 25 days

issue closedgolang/tour

tour: [REPLACE WITH SHORT DESCRIPTION]

Context: https://tour.golang.org/basics/16

Change the title above to describe your issue and add your feedback here, including code if necessary

closed time in 25 days

sudarshanstark

issue commentgolang/tour

tour: [REPLACE WITH SHORT DESCRIPTION]

Empty issue, closing.

sudarshanstark

comment created time in 25 days

issue closedgolang/tour

tour: [slice of length 1:4 returns no results]

Context: https://tour.golang.org/moretypes/10

the following code prints 0 results

s := []int{2, 3, 5, 7, 11, 13} s = s[1:4] fmt.Println(s)

the following code all prints more than one result s := []int{2, 3, 5, 7, 11, 13} s = s[2:4] // s = s[1:5] // s = s[2:5] fmt.Println(s)

closed time in 25 days

jacobr2009

issue commentgolang/tour

tour: [slice of length 1:4 returns no results]

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

jacobr2009

comment created time in 25 days

issue closedgolang/tour

tour: Code in "Exercise: Loops and Functions" is uncompleted

Context: https://tour.golang.org/flowcontrol/8

When I follow the tour into "Exercise: Loops and Functions", the body of function Sqrt() have no content and the code just can't run. The github code in content/flowcontrol/exercise-loops-and-functions.go is also missing function body. Is it a bug?

closed time in 25 days

shuhari

issue commentgolang/tour

tour: Code in "Exercise: Loops and Functions" is uncompleted

No, it's an exercise. The text says:

Implement this in the func Sqrt provided.

Closing here.

shuhari

comment created time in 25 days

issue closedgolang/tour

tour: for some reason the number does not appear.

Context: https://tour.golang.org/basics/4

The output should show 55 but it just says the program exited. I added another random to statement to check if it is due to the return, I guess it was but I am not an expert so, I would love some feedback.

closed time in 25 days

ustaads

issue commentgolang/tour

tour: for some reason the number does not appear.

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

ustaads

comment created time in 25 days

issue closedgolang/tour

tour: no output with single space

Context: https://tour.golang.org/welcome/1

output is empty with one space between "", and parameter for example

  1. hello.go there is one space between Hello, and 世界
  2. in sandbox.go there is one space between "The time is", and time.Now() If I removed the space or added few more space its working fine. Tested on Chrome and Safari browser on MAC OSX.

closed time in 25 days

APJaiswal

issue commentgolang/tour

tour: no output with single space

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

APJaiswal

comment created time in 25 days

issue closedgolang/tour

tour: Program exits without printing

Context: https://tour.golang.org/basics/11

The program exists without printing if fmt is imported using the parentheses import.

closed time in 25 days

RazvanMocan

issue commentgolang/tour

tour: Program exits without printing

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

RazvanMocan

comment created time in 25 days

issue closedgolang/tour

tour: blank output in Chrome for #17

Context: https://tour.golang.org/methods/17

With fmt.Println(a, z) on line #17, a blank/empty line is being displayed? These all seem to work: fmt.Println(z, a) fmt.Println(a) fmt.Println(z)

closed time in 25 days

swrobbins

issue commentgolang/tour

tour: blank output in Chrome for #17

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

swrobbins

comment created time in 25 days

issue closedgolang/tour

Program throwing error

Context: https://tour.golang.org/methods/9

the error is as follows ./prog.go:37:4: cannot use v (type Vertex) as type Abser in assignment: Vertex does not implement Abser (Abs method has pointer receiver)

closed time in 25 days

rehandxtr

issue commentgolang/tour

Program throwing error

From the text on the left:

Note: There is an error in the example code on line 22. Vertex (the value type) doesn't implement Abser because the Abs method is defined only on *Vertex (the pointer type).

So this is expected. Closing here.

rehandxtr

comment created time in 25 days

issue closedgolang/tour

tour: there is no output from fmt.Println(add(42, 13))

Context: https://tour.golang.org/basics/4

image

If I change it to fmt.Println(0+add(42, 13)) it shows 55

windows 10, 1903 , chrome, Version 79.0.3945.130 (Official Build) (64-bit)

closed time in 25 days

brempusz

issue commentgolang/tour

tour: there is no output from fmt.Println(add(42, 13))

There was a caching issues with the playground (which stores the tour programs); which is now fixed. Closing here.

brempusz

comment created time in 25 days

more