LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /opt/golang/1.22.0/src/cmd/go/testdata/script/
File Upload :
Command :
Current File : //opt/golang/1.22.0/src/cmd/go/testdata/script/work_reject_modfile.txt

# Test that -modfile=path/to/go.mod is rejected in workspace mode.

! go list -m -modfile=./a/go.alt.mod
stderr 'go: -modfile cannot be used in workspace mode'

env GOFLAGS=-modfile=./a/go.alt.mod
! go list -m
stderr 'go: -modfile cannot be used in workspace mode'

-- go.work --
go 1.20

use (
    ./a
)

-- a/go.mod --
module example.com/foo

go 1.20

-- a/go.alt.mod --
module example.com/foo

go 1.20

-- a/main.go --
package main

import "fmt"

func main() {
	fmt.Println("Hello world!")
}

LittleDemon - FACEBOOK
[ KELUAR ]