Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken Go tutorial code and fix typo #73

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions go-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,7 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
# The first declaration of an external repository "wins".
############################################################

# we are going to store the go dependecy definitions
# in a different file "deps.bzl". We can include those
# definitions in this file, but it gets quite verbose.
load("//:deps.bzl", "go_dependencies")

# Next we initialize the toolchains

# gazelle:repository_macro deps.bzl%go_dependencies
go_dependencies()

go_rules_dependencies()

# We define the version of go that this project uses
Expand Down Expand Up @@ -354,7 +345,7 @@ $ bazelisk run //:gazelle-update-repos
Which is the equivalent of running:

```bash
$ bazelist run //:gazelle update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies -prune
$ bazelisk run //:gazelle update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies -prune
```

The update-repos command is a very common way of running Gazelle.
Expand Down Expand Up @@ -424,7 +415,7 @@ and created new `BUILD.bazel` files as well. Here is a layout of the Bazel files
   └── BUILD.bazel
```

The `WORKSPACE` file was updated as well, and we have a new file called `deps.bzl`.
The `WORKSPACE` file was updated as well, now loading the go dependecy definitions from a new file called `deps.bzl`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's typo in the new text: dependecy should be dependency

We now have a working Bazel project, so what commands can we run?

### Basic Bazel commands
Expand Down