Squashed 'golang-install/' content from commit 258f94f
git-subtree-dir: golang-install git-subtree-split: 258f94f6120bbf99f4c9133c9ab5826dcd359fbe
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
mkdir -p "/tmp/validate-go"
|
||||
pushd "/tmp/validate-go"
|
||||
go mod init example.com/user/hello
|
||||
cat >hello.go <<EOF
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
EOF
|
||||
echo "Building hello test project"
|
||||
go build
|
||||
echo "Run hello test project"
|
||||
./hello
|
||||
popd
|
||||
Reference in New Issue
Block a user