Skip to content

Commit 07a31a2

Browse files
committed
add private-modules
1 parent 9056b0e commit 07a31a2

File tree

12 files changed

+96
-0
lines changed

12 files changed

+96
-0
lines changed

private-modules/app/app.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package main
2+
3+
import (
4+
"github.com/bigwhite/privatemodule3"
5+
"mycompany.com/go/privatemodule1"
6+
"mycompany.com/go/privatemodule2"
7+
)
8+
9+
func main() {
10+
privatemodule3.F()
11+
privatemodule2.F()
12+
privatemodule1.F()
13+
}

private-modules/app/go.mod

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module app
2+
3+
go 1.19
4+
5+
require (
6+
github.com/bigwhite/privatemodule3 v0.0.0-20230227061700-3762215e798f
7+
mycompany.com/go/privatemodule1 v1.0.0
8+
mycompany.com/go/privatemodule2 v1.0.0
9+
)
10+
11+
replace (
12+
mycompany.com/go/privatemodule1 v1.0.0 => 10.10.30.30/ard/incubators/privatemodule1.git v0.0.0-20230227061032-c4a6ea813d1a
13+
mycompany.com/go/privatemodule2 v1.0.0 => github.com/bigwhite/privatemodule2 v0.0.0-20230227061454-a2de3aaa7b27
14+
)

private-modules/app/go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
10.10.30.30/ard/incubators/privatemodule1.git v0.0.0-20230227061032-c4a6ea813d1a h1:09Kc4ELxUgzmmOmjYQkmfDMyG1iTnmUfHmJaFi2MgL0=
2+
10.10.30.30/ard/incubators/privatemodule1.git v0.0.0-20230227061032-c4a6ea813d1a/go.mod h1:0Aaj7LxPmJ0DzArgzPFGLLhs94rfxY+XHhaWqgAEmj8=
3+
github.com/bigwhite/privatemodule2 v0.0.0-20230227061454-a2de3aaa7b27 h1:ZJSLNsJyS2q8s3TjGxgvDi0BIjC6AfmiLgfa+om9Mow=
4+
github.com/bigwhite/privatemodule2 v0.0.0-20230227061454-a2de3aaa7b27/go.mod h1:muqLObhFuYk34A8ml4ddlIQREb+LZ5wQSpQzZ+0/48U=
5+
github.com/bigwhite/privatemodule3 v0.0.0-20230227061700-3762215e798f h1:plaoz3vdbZxkLGne/TdSpy2qBSzMkfmRsSIr+rTVJkA=
6+
github.com/bigwhite/privatemodule3 v0.0.0-20230227061700-3762215e798f/go.mod h1:enVYiChKPiXSKxQJrD3mQaSc/IFyolMlIiYCe8HF0cw=
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# privatemodule1
2+
3+
test repo
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module mycompany.com/go/privatemodule1
2+
3+
go 1.19
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package privatemodule1
2+
3+
import "fmt"
4+
5+
func F() {
6+
fmt.Println("invoke F of mycompany.com/go/privatemodule1")
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module mycompany.com/go/privatemodule2
2+
3+
go 1.19
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package privatemodule2
2+
3+
import "fmt"
4+
5+
func F() {
6+
fmt.Println("invoke F of mycompany.com/go/privatemodule2")
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/

0 commit comments

Comments
 (0)