mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
golang: add a simple compilation test
Add a simple CI compilation test to ensure that the Go toolchain is functional. Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
@@ -7,3 +7,17 @@ case "$1" in
|
||||
esac
|
||||
|
||||
go version | grep -F " go$PKG_VERSION "
|
||||
|
||||
cat <<'EOF' > hello.go
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello, World!")
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
go run hello.go
|
||||
rm hello.go
|
||||
|
||||
Reference in New Issue
Block a user