chore(deps): update Go to 1.24 and switch to go-version-file (#8388)

Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
Teppei Fukuda
2025-03-05 10:40:42 +04:00
committed by GitHub
parent 453c66dd30
commit 57b08d62de
17 changed files with 37 additions and 44 deletions

View File

@@ -56,24 +56,24 @@ func RegisterModule(p api.Module) {
module = p
}
//export name
//go:wasmexport name
func _name() uint64 {
name := module.Name()
ptr, size := stringToPtr(name)
return (uint64(ptr) << uint64(32)) | uint64(size)
}
//export api_version
//go:wasmexport api_version
func _apiVersion() uint32 {
return api.Version
}
//export version
//go:wasmexport version
func _version() uint32 {
return uint32(module.Version())
}
//export is_analyzer
//go:wasmexport is_analyzer
func _isAnalyzer() uint64 {
if _, ok := module.(api.Analyzer); !ok {
return 0
@@ -81,14 +81,14 @@ func _isAnalyzer() uint64 {
return 1
}
//export required
//go:wasmexport required
func _required() uint64 {
files := module.(api.Analyzer).RequiredFiles()
ss := serialize.StringSlice(files)
return marshal(ss)
}
//export analyze
//go:wasmexport analyze
func _analyze(ptr, size uint32) uint64 {
filePath := ptrToString(ptr, size)
custom, err := module.(api.Analyzer).Analyze(filePath)
@@ -99,7 +99,7 @@ func _analyze(ptr, size uint32) uint64 {
return marshal(custom)
}
//export is_post_scanner
//go:wasmexport is_post_scanner
func _isPostScanner() uint64 {
if _, ok := module.(api.PostScanner); !ok {
return 0
@@ -107,12 +107,12 @@ func _isPostScanner() uint64 {
return 1
}
//export post_scan_spec
//go:wasmexport post_scan_spec
func _post_scan_spec() uint64 {
return marshal(module.(api.PostScanner).PostScanSpec())
}
//export post_scan
//go:wasmexport post_scan
func _post_scan(ptr, size uint32) uint64 {
var results serialize.Results
if err := unmarshal(ptr, size, &results); err != nil {