tree: ccfb0d1da032c63b31c0f08605546827526dfbc4 [path history] [tgz]
  1. .bazelrc
  2. BUILD.bazel
  3. hello.go
  4. hello_test.go
  5. MODULE.bazel
  6. README.md
examples/hello/README.md

rules_go “Hello World” example

This directory contains a minimal, standalone example using Bazel and rules_go. It shows how to use the go_binary, go_library, and go_test rules without requiring any other dependencies.

To run the binary:

bazel run //:hello

To test the library:

bazel test //:hello_test

For an explanation and an introduction to Bazel, see Bazel Tutorial: Build a Go Project.