Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: Multiple packages in the directory: time, main #50244

Closed
520MianXiangDuiXiang520 opened this issue Dec 17, 2021 · 3 comments
Closed

time: Multiple packages in the directory: time, main #50244

520MianXiangDuiXiang520 opened this issue Dec 17, 2021 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@520MianXiangDuiXiang520

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

$ go version
go version go1.18beta1 windows/amd64

Does this issue reproduce with the latest release?

  • yes

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

go env Output
$ go env
set GO111MODULE=on
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=E:\goProject\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\goProject
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,https://goproxy.io,direct
set GOROOT=E:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=E:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18beta1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\lenovo\AppData\Local\Temp\go-build1614885817=/tmp/go-build -gno-record-gcc-switches

What did you do?

I plan to use the time package, but I got this error on goland:

Multiple packages in the directory: time, main

This seems to be caused by genzabbrs.go. Although it will not be compiled, it seems not good to have multiple packages in the same directory, so is it possible to move this type of file to another directory?

What did you expect to see?

  • A cleaner time directory

What did you see instead?

  • There are multiple different packages in the same directory
@seankhliao
Copy link
Member

The file is guarded by the build tag //go:build ignore.
How are you using the package/building your program?

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Dec 17, 2021
@seankhliao seankhliao changed the title 1.18beta1: src/time Multiple packages in the directory: time, main time: Multiple packages in the directory: time, main Dec 17, 2021
@ianlancetaylor
Copy link
Contributor

This is normal and intended. There are other examples of this in the standard library, such as crypto/md5 and encoding/gob.

@520MianXiangDuiXiang520
Copy link
Author

Yes, it won’t have any problems when compiling, I just think it’s a better idea to keep the directory clean. That’s okay, thanks for your reply

@golang golang locked and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants