-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from breml/fix-build
Fix test for Go 1.22, update GH actions.
- Loading branch information
Showing
10 changed files
with
240 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build !go1.22 | ||
// +build !go1.22 | ||
|
||
package main | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build go1.22 | ||
// +build go1.22 | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/google/uuid" // want "Package github.com/google/uuid has not allowed capability CAPABILITY_NETWORK" "Package github.com/google/uuid has not allowed capability CAPABILITY_REFLECT" | ||
) | ||
|
||
func main() { | ||
uuid.GetTime() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
{ | ||
"capabilityInfo": [ | ||
{ | ||
"packageName": "main", | ||
"capability": "CAPABILITY_REFLECT", | ||
"depPath": "alltest/capslockfile.init github.com/google/uuid.init database/sql/driver.init reflect.TypeFor[database/sql/driver.Valuer]", | ||
"path": [ | ||
{ | ||
"name": "alltest/capslockfile.init" | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.init" | ||
}, | ||
{ | ||
"name": "database/sql/driver.init" | ||
}, | ||
{ | ||
"name": "reflect.TypeFor[database/sql/driver.Valuer]", | ||
"site": { | ||
"filename": "types.go", | ||
"line": "215", | ||
"column": "48" | ||
} | ||
} | ||
], | ||
"packageDir": "alltest/capslockfile", | ||
"capabilityType": "CAPABILITY_TYPE_TRANSITIVE" | ||
}, | ||
{ | ||
"packageName": "main", | ||
"capability": "CAPABILITY_NETWORK", | ||
"depPath": "alltest/capslockfile.main github.com/google/uuid.GetTime github.com/google/uuid.getTime github.com/google/uuid.setClockSequence github.com/google/uuid.randomBits io.ReadFull io.ReadAtLeast (*net.TCPConn).Read (*net.conn).Read", | ||
"path": [ | ||
{ | ||
"name": "alltest/capslockfile.main" | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.GetTime", | ||
"site": { | ||
"filename": "capslockfile.go", | ||
"line": "8", | ||
"column": "14" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.getTime", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "48", | ||
"column": "16" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.setClockSequence", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "56", | ||
"column": "19" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.randomBits", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "100", | ||
"column": "13" | ||
} | ||
}, | ||
{ | ||
"name": "io.ReadFull", | ||
"site": { | ||
"filename": "util.go", | ||
"line": "13", | ||
"column": "26" | ||
} | ||
}, | ||
{ | ||
"name": "io.ReadAtLeast", | ||
"site": { | ||
"filename": "io.go", | ||
"line": "354", | ||
"column": "20" | ||
} | ||
}, | ||
{ | ||
"name": "(*net.TCPConn).Read", | ||
"site": { | ||
"filename": "io.go", | ||
"line": "335", | ||
"column": "19" | ||
} | ||
}, | ||
{ | ||
"name": "(*net.conn).Read" | ||
} | ||
], | ||
"packageDir": "alltest/capslockfile", | ||
"capabilityType": "CAPABILITY_TYPE_TRANSITIVE" | ||
}, | ||
{ | ||
"packageName": "main", | ||
"capability": "CAPABILITY_FILES", | ||
"depPath": "alltest/capslockfile.main github.com/google/uuid.GetTime github.com/google/uuid.getTime github.com/google/uuid.setClockSequence github.com/google/uuid.randomBits io.ReadFull io.ReadAtLeast (*os.File).Read", | ||
"path": [ | ||
{ | ||
"name": "alltest/capslockfile.main" | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.GetTime", | ||
"site": { | ||
"filename": "capslockfile.go", | ||
"line": "8", | ||
"column": "14" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.getTime", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "48", | ||
"column": "16" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.setClockSequence", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "56", | ||
"column": "19" | ||
} | ||
}, | ||
{ | ||
"name": "github.com/google/uuid.randomBits", | ||
"site": { | ||
"filename": "time.go", | ||
"line": "100", | ||
"column": "13" | ||
} | ||
}, | ||
{ | ||
"name": "io.ReadFull", | ||
"site": { | ||
"filename": "util.go", | ||
"line": "13", | ||
"column": "26" | ||
} | ||
}, | ||
{ | ||
"name": "io.ReadAtLeast", | ||
"site": { | ||
"filename": "io.go", | ||
"line": "354", | ||
"column": "20" | ||
} | ||
}, | ||
{ | ||
"name": "(*os.File).Read", | ||
"site": { | ||
"filename": "io.go", | ||
"line": "335", | ||
"column": "19" | ||
} | ||
} | ||
], | ||
"packageDir": "alltest/capslockfile", | ||
"capabilityType": "CAPABILITY_TYPE_TRANSITIVE" | ||
} | ||
], | ||
"moduleInfo": [ | ||
{ | ||
"path": "github.com/google/uuid", | ||
"version": "v1.3.1" | ||
} | ||
], | ||
"packageInfo": [ | ||
{ | ||
"path": "alltest/capslockfile", | ||
"ignoredFiles": [ | ||
"tools.go" | ||
] | ||
}, | ||
{ | ||
"path": "github.com/google/uuid", | ||
"ignoredFiles": [ | ||
"node_js.go" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build !go1.22 | ||
// +build !go1.22 | ||
|
||
package function | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build go1.22 | ||
// +build go1.22 | ||
|
||
package function | ||
|
||
import ( | ||
"github.com/google/uuid" // want "Package github.com/google/uuid has not allowed capability CAPABILITY_FILES" "Package github.com/google/uuid has not allowed capability CAPABILITY_NETWORK" "Package github.com/google/uuid has not allowed capability CAPABILITY_REFLECT" | ||
) | ||
|
||
func Call() { | ||
uuid.GetTime() // regular function call is reported | ||
} |