workspace: pkg1 imports pkg2 imports pkg3

68 views
Skip to first unread message

Peter Kleiweg

unread,
Nov 2, 2025, 8:22:49 AM (9 days ago) Nov 2
to golang-nuts
I have tree packages I want to work on locally. pkg1 imports pkg2. pkg2 imports pkg3.

I have a file `go.work`:

    go 1.25.3
    use (
        ./pkg1
        ./pkg2
        ./pkg3
    )

When I build pkg2 it uses the local version of pkg3.

But when I build pkg1, it uses the local version of pkg2, but not the local version of pkg3.

How do I fix this?


I use 'go 'work
Reply all
Reply to author
Forward
0 new messages