Created
November 9, 2017 20:08
-
-
Save cgbystrom/6973b478e23286604c80c506b216a9b3 to your computer and use it in GitHub Desktop.
Minimal Go app built with Bazel
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
package(default_visibility = ["//visibility:public"]) | |
load("@io_bazel_rules_go//go:def.bzl", "go_prefix", "go_binary") | |
go_prefix("helloworld") | |
go_binary( | |
name = "helloworld", | |
srcs = ["helloworld.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
package main | |
func main() { | |
println("Hello!") | |
} |
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
http_archive( | |
name = "io_bazel_rules_go", | |
url = "https://github.com/bazelbuild/rules_go/releases/download/0.7.0/rules_go-0.7.0.tar.gz", | |
sha256 = "91fca9cf860a1476abdc185a5f675b641b60d3acf0596679a27b580af60bf19c", | |
) | |
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") | |
go_rules_dependencies() | |
go_register_toolchains() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment