Bug 1639510

Summary: golang-1.11.1-1 go: unknown subcommand "mod"
Product: [Fedora] Fedora Reporter: Joe Doss <joe>
Component: golangAssignee: Vincent Batts <vbatts>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: amurdaca, jcajka, lemenkov, renich, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-15 22:42:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Doss 2018-10-15 22:28:43 UTC
Description of problem:

golang-1.11.1-1 seems to be missing the new subcommand mod which allows you to use the built in module support.

https://golang.org/doc/go1.11#modules
https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more

Version-Release number of selected component (if applicable):

golang-1.11.1-1

How reproducible:

Always.

Steps to Reproduce:
1. dnf install golang-1.11.1-1.fc29.x86_64
2. go mod init
3. Enjoy the error message of go: unknown subcommand "mod"

Actual results:

$ go mod init
go: unknown subcommand "mod"
Run 'go help' for usage.

Expected results:

Golang module support.

Comment 1 Joe Doss 2018-10-15 22:42:33 UTC
The gcc-go strikes again. This issue can be closed. Removing gcc-go fixes this issue. 

$ sudo dnf remove gcc-go-8.2.1-4.fc29.x86_64


$ go mod
Go mod provides access to operations on modules.

Note that support for modules is built into all the go commands,
not just 'go mod'. For example, day-to-day adding, removing, upgrading,
and downgrading of dependencies should be done using 'go get'.
See 'go help modules' for an overview of module functionality.

Usage:

	go mod <command> [arguments]

The commands are:

	download    download modules to local cache
	edit        edit go.mod from tools or scripts
	graph       print module requirement graph
	init        initialize new module in current directory
	tidy        add missing and remove unused modules
	vendor      make vendored copy of dependencies
	verify      verify dependencies have expected content
	why         explain why packages or modules are needed

Use "go help mod <command>" for more information about a command.