aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/basics/basic-types.go2
-rw-r--r--content/basics/constants.go2
-rw-r--r--content/basics/exported-names.go2
-rw-r--r--content/basics/functions-continued.go2
-rw-r--r--content/basics/functions.go2
-rw-r--r--content/basics/imports.go2
-rw-r--r--content/basics/multiple-results.go2
-rw-r--r--content/basics/named-results.go2
-rw-r--r--content/basics/numeric-constants.go2
-rw-r--r--content/basics/packages.go2
-rw-r--r--content/basics/short-variable-declarations.go2
-rw-r--r--content/basics/type-conversions.go2
-rw-r--r--content/basics/type-inference.go2
-rw-r--r--content/basics/variables-with-initializers.go2
-rw-r--r--content/basics/variables.go2
-rw-r--r--content/basics/zero.go2
-rw-r--r--content/concurrency/buffered-channels.go2
-rw-r--r--content/concurrency/channels.go2
-rw-r--r--content/concurrency/default-selection.go2
-rw-r--r--content/concurrency/exercise-equivalent-binary-trees.go2
-rw-r--r--content/concurrency/exercise-web-crawler.go2
-rw-r--r--content/concurrency/goroutines.go2
-rw-r--r--content/concurrency/mutex-counter.go2
-rw-r--r--content/concurrency/range-and-close.go2
-rw-r--r--content/concurrency/select.go2
-rw-r--r--content/content_test.go12
-rw-r--r--content/flowcontrol/defer-multi.go2
-rw-r--r--content/flowcontrol/defer.go2
-rw-r--r--content/flowcontrol/exercise-loops-and-functions.go2
-rw-r--r--content/flowcontrol/for-continued.go4
-rw-r--r--content/flowcontrol/for-is-gos-while.go2
-rw-r--r--content/flowcontrol/for.go2
-rw-r--r--content/flowcontrol/forever.go2
-rw-r--r--content/flowcontrol/if-and-else.go2
-rw-r--r--content/flowcontrol/if-with-a-short-statement.go2
-rw-r--r--content/flowcontrol/if.go2
-rw-r--r--content/flowcontrol/switch-evaluation-order.go2
-rw-r--r--content/flowcontrol/switch-with-no-condition.go2
-rw-r--r--content/flowcontrol/switch.go2
-rw-r--r--content/methods/empty-interface.go2
-rw-r--r--content/methods/errors.go2
-rw-r--r--content/methods/exercise-errors.go2
-rw-r--r--content/methods/exercise-images.go2
-rw-r--r--content/methods/exercise-reader.go2
-rw-r--r--content/methods/exercise-rot-reader.go2
-rw-r--r--content/methods/exercise-stringer.go2
-rw-r--r--content/methods/images.go2
-rw-r--r--content/methods/indirection-values.go2
-rw-r--r--content/methods/indirection.go2
-rw-r--r--content/methods/interface-values-with-nil.go2
-rw-r--r--content/methods/interface-values.go2
-rw-r--r--content/methods/interfaces-are-satisfied-implicitly.go2
-rw-r--r--content/methods/interfaces.go2
-rw-r--r--content/methods/methods-continued.go2
-rw-r--r--content/methods/methods-funcs.go2
-rw-r--r--content/methods/methods-pointers-explained.go2
-rw-r--r--content/methods/methods-pointers.go2
-rw-r--r--content/methods/methods-with-pointer-receivers.go2
-rw-r--r--content/methods/methods.go2
-rw-r--r--content/methods/nil-interface-values.go2
-rw-r--r--content/methods/reader.go2
-rw-r--r--content/methods/stringer.go2
-rw-r--r--content/methods/type-assertions.go2
-rw-r--r--content/methods/type-switches.go2
-rw-r--r--content/moretypes/append.go2
-rw-r--r--content/moretypes/array.go2
-rw-r--r--content/moretypes/exercise-fibonacci-closure.go2
-rw-r--r--content/moretypes/exercise-maps.go2
-rw-r--r--content/moretypes/exercise-slices.go2
-rw-r--r--content/moretypes/function-closures.go2
-rw-r--r--content/moretypes/function-values.go2
-rw-r--r--content/moretypes/making-slices.go2
-rw-r--r--content/moretypes/map-literals-continued.go2
-rw-r--r--content/moretypes/map-literals.go2
-rw-r--r--content/moretypes/maps.go2
-rw-r--r--content/moretypes/mutating-maps.go2
-rw-r--r--content/moretypes/nil-slices.go2
-rw-r--r--content/moretypes/pointers.go2
-rw-r--r--content/moretypes/range-continued.go2
-rw-r--r--content/moretypes/range.go2
-rw-r--r--content/moretypes/slice-bounds.go2
-rw-r--r--content/moretypes/slice-len-cap.go2
-rw-r--r--content/moretypes/slice-literals.go2
-rw-r--r--content/moretypes/slices-of-slice.go2
-rw-r--r--content/moretypes/slices-pointers.go2
-rw-r--r--content/moretypes/slices.go2
-rw-r--r--content/moretypes/struct-fields.go2
-rw-r--r--content/moretypes/struct-literals.go2
-rw-r--r--content/moretypes/struct-pointers.go2
-rw-r--r--content/moretypes/structs.go2
-rw-r--r--content/welcome/hello.go2
-rw-r--r--content/welcome/sandbox.go2
-rw-r--r--solutions/binarytrees.go2
-rw-r--r--solutions/binarytrees_quit.go2
-rw-r--r--solutions/errors.go2
-rw-r--r--solutions/fib.go2
-rw-r--r--solutions/http.go2
-rw-r--r--solutions/image.go2
-rw-r--r--solutions/loops.go2
-rw-r--r--solutions/maps.go2
-rw-r--r--solutions/readers.go2
-rw-r--r--solutions/rot13.go2
-rw-r--r--solutions/slices.go2
-rw-r--r--solutions/stringers.go2
-rw-r--r--solutions/webcrawler.go2
105 files changed, 111 insertions, 111 deletions
diff --git a/content/basics/basic-types.go b/content/basics/basic-types.go
index 99becee..5b01573 100644
--- a/content/basics/basic-types.go
+++ b/content/basics/basic-types.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/constants.go b/content/basics/constants.go
index 21eb716..a511433 100644
--- a/content/basics/constants.go
+++ b/content/basics/constants.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/exported-names.go b/content/basics/exported-names.go
index 1eec5cb..de393eb 100644
--- a/content/basics/exported-names.go
+++ b/content/basics/exported-names.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/basics/functions-continued.go b/content/basics/functions-continued.go
index 432d47f..08934ad 100644
--- a/content/basics/functions-continued.go
+++ b/content/basics/functions-continued.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/functions.go b/content/basics/functions.go
index 5b71184..5d56f27 100644
--- a/content/basics/functions.go
+++ b/content/basics/functions.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/imports.go b/content/basics/imports.go
index df205dd..2f3a0d9 100644
--- a/content/basics/imports.go
+++ b/content/basics/imports.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/multiple-results.go b/content/basics/multiple-results.go
index 1b86fd7..61f4a19 100644
--- a/content/basics/multiple-results.go
+++ b/content/basics/multiple-results.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/named-results.go b/content/basics/named-results.go
index 0047872..734b80a 100644
--- a/content/basics/named-results.go
+++ b/content/basics/named-results.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/numeric-constants.go b/content/basics/numeric-constants.go
index 9e089c3..26e5a5f 100644
--- a/content/basics/numeric-constants.go
+++ b/content/basics/numeric-constants.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/packages.go b/content/basics/packages.go
index 7a48838..a131a1b 100644
--- a/content/basics/packages.go
+++ b/content/basics/packages.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/short-variable-declarations.go b/content/basics/short-variable-declarations.go
index c6edd9f..03c6ce4 100644
--- a/content/basics/short-variable-declarations.go
+++ b/content/basics/short-variable-declarations.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/type-conversions.go b/content/basics/type-conversions.go
index 0ce3537..a478b51 100644
--- a/content/basics/type-conversions.go
+++ b/content/basics/type-conversions.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/type-inference.go b/content/basics/type-inference.go
index c408a69..479d36f 100644
--- a/content/basics/type-inference.go
+++ b/content/basics/type-inference.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/variables-with-initializers.go b/content/basics/variables-with-initializers.go
index d27f855..299a6a8 100644
--- a/content/basics/variables-with-initializers.go
+++ b/content/basics/variables-with-initializers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/variables.go b/content/basics/variables.go
index cd4c26a..0c757f3 100644
--- a/content/basics/variables.go
+++ b/content/basics/variables.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/basics/zero.go b/content/basics/zero.go
index eb95a07..4d757df 100644
--- a/content/basics/zero.go
+++ b/content/basics/zero.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/buffered-channels.go b/content/concurrency/buffered-channels.go
index b5abf10..1008922 100644
--- a/content/concurrency/buffered-channels.go
+++ b/content/concurrency/buffered-channels.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/channels.go b/content/concurrency/channels.go
index 60fc324..82d4b63 100644
--- a/content/concurrency/channels.go
+++ b/content/concurrency/channels.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/default-selection.go b/content/concurrency/default-selection.go
index 8e0d2a5..9f7ee7a 100644
--- a/content/concurrency/default-selection.go
+++ b/content/concurrency/default-selection.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/exercise-equivalent-binary-trees.go b/content/concurrency/exercise-equivalent-binary-trees.go
index 788400b..9fa86a8 100644
--- a/content/concurrency/exercise-equivalent-binary-trees.go
+++ b/content/concurrency/exercise-equivalent-binary-trees.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/concurrency/exercise-web-crawler.go b/content/concurrency/exercise-web-crawler.go
index d342aa1..7e925c1 100644
--- a/content/concurrency/exercise-web-crawler.go
+++ b/content/concurrency/exercise-web-crawler.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/goroutines.go b/content/concurrency/goroutines.go
index 9efc833..8acd58c 100644
--- a/content/concurrency/goroutines.go
+++ b/content/concurrency/goroutines.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/mutex-counter.go b/content/concurrency/mutex-counter.go
index 4983d60..d66d8b7 100644
--- a/content/concurrency/mutex-counter.go
+++ b/content/concurrency/mutex-counter.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/range-and-close.go b/content/concurrency/range-and-close.go
index 6e5a3b8..ce29734 100644
--- a/content/concurrency/range-and-close.go
+++ b/content/concurrency/range-and-close.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/concurrency/select.go b/content/concurrency/select.go
index d657f01..d9bd7d4 100644
--- a/content/concurrency/select.go
+++ b/content/concurrency/select.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/content_test.go b/content/content_test.go
index 4c0ff2a..f48d003 100644
--- a/content/content_test.go
+++ b/content/content_test.go
@@ -18,8 +18,8 @@ import (
// Test that all the .go files inside the content file build
// and execute (without checking for output correctness).
-// Files that contain the string "// +build no-build" are not built.
-// Files that contain the string "// +build no-run" are not executed.
+// Files that contain the string "//go:build nobuild" are not built.
+// Files that contain the string "//go:build norun" are not executed.
func TestContent(t *testing.T) {
if _, err := exec.LookPath("go"); err != nil {
t.Skipf("skipping because 'go' executable not available: %v", err)
@@ -55,14 +55,14 @@ func testSnippet(t *testing.T, path, scratch string) error {
}
build := string(bytes.SplitN(b, []byte{'\n'}, 2)[0])
- if !strings.HasPrefix(build, "// +build ") {
- return errors.New("first line is not a +build comment")
+ if !strings.HasPrefix(build, "//go:build ") {
+ return errors.New("first line is not a go:build comment")
}
if !strings.Contains(build, "OMIT") {
return errors.New(`+build comment does not contain "OMIT"`)
}
- if strings.Contains(build, "no-build") {
+ if strings.Contains(build, "nobuild") {
return nil
}
bin := filepath.Join(scratch, filepath.Base(path)+".exe")
@@ -72,7 +72,7 @@ func testSnippet(t *testing.T, path, scratch string) error {
}
defer os.Remove(bin)
- if strings.Contains(build, "no-run") {
+ if strings.Contains(build, "norun") {
return nil
}
out, err = exec.Command(bin).CombinedOutput()
diff --git a/content/flowcontrol/defer-multi.go b/content/flowcontrol/defer-multi.go
index 82419d5..e5d9680 100644
--- a/content/flowcontrol/defer-multi.go
+++ b/content/flowcontrol/defer-multi.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/defer.go b/content/flowcontrol/defer.go
index 3314c05..2b67c2e 100644
--- a/content/flowcontrol/defer.go
+++ b/content/flowcontrol/defer.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/exercise-loops-and-functions.go b/content/flowcontrol/exercise-loops-and-functions.go
index 68c334d..46dad33 100644
--- a/content/flowcontrol/exercise-loops-and-functions.go
+++ b/content/flowcontrol/exercise-loops-and-functions.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/flowcontrol/for-continued.go b/content/flowcontrol/for-continued.go
index 71c9686..fcf2f87 100644
--- a/content/flowcontrol/for-continued.go
+++ b/content/flowcontrol/for-continued.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
@@ -6,7 +6,7 @@ import "fmt"
func main() {
sum := 1
- for ; sum < 1000; {
+ for sum < 1000 {
sum += sum
}
fmt.Println(sum)
diff --git a/content/flowcontrol/for-is-gos-while.go b/content/flowcontrol/for-is-gos-while.go
index 5f6fce4..fcf2f87 100644
--- a/content/flowcontrol/for-is-gos-while.go
+++ b/content/flowcontrol/for-is-gos-while.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/for.go b/content/flowcontrol/for.go
index 0bf8713..653ddc4 100644
--- a/content/flowcontrol/for.go
+++ b/content/flowcontrol/for.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/forever.go b/content/flowcontrol/forever.go
index d3a9c9d..6fb4b2a 100644
--- a/content/flowcontrol/forever.go
+++ b/content/flowcontrol/forever.go
@@ -1,4 +1,4 @@
-// +build no-run OMIT
+//go:build norun || OMIT
package main
diff --git a/content/flowcontrol/if-and-else.go b/content/flowcontrol/if-and-else.go
index f627c40..ca6b636 100644
--- a/content/flowcontrol/if-and-else.go
+++ b/content/flowcontrol/if-and-else.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/if-with-a-short-statement.go b/content/flowcontrol/if-with-a-short-statement.go
index 30a0cbf..41ea124 100644
--- a/content/flowcontrol/if-with-a-short-statement.go
+++ b/content/flowcontrol/if-with-a-short-statement.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/if.go b/content/flowcontrol/if.go
index 1d6d841..4da2e64 100644
--- a/content/flowcontrol/if.go
+++ b/content/flowcontrol/if.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/switch-evaluation-order.go b/content/flowcontrol/switch-evaluation-order.go
index 5020e52..3681d55 100644
--- a/content/flowcontrol/switch-evaluation-order.go
+++ b/content/flowcontrol/switch-evaluation-order.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/switch-with-no-condition.go b/content/flowcontrol/switch-with-no-condition.go
index 4cc9d40..2d65b91 100644
--- a/content/flowcontrol/switch-with-no-condition.go
+++ b/content/flowcontrol/switch-with-no-condition.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/flowcontrol/switch.go b/content/flowcontrol/switch.go
index 438c983..13e49b8 100644
--- a/content/flowcontrol/switch.go
+++ b/content/flowcontrol/switch.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/empty-interface.go b/content/methods/empty-interface.go
index 10e9861..db8348b 100644
--- a/content/methods/empty-interface.go
+++ b/content/methods/empty-interface.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/errors.go b/content/methods/errors.go
index 614e03b..10fc856 100644
--- a/content/methods/errors.go
+++ b/content/methods/errors.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/exercise-errors.go b/content/methods/exercise-errors.go
index 22e933b..dcd3bd0 100644
--- a/content/methods/exercise-errors.go
+++ b/content/methods/exercise-errors.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/exercise-images.go b/content/methods/exercise-images.go
index 34bd129..5ec0c4b 100644
--- a/content/methods/exercise-images.go
+++ b/content/methods/exercise-images.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/methods/exercise-reader.go b/content/methods/exercise-reader.go
index 7f1dfdd..614336c 100644
--- a/content/methods/exercise-reader.go
+++ b/content/methods/exercise-reader.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/methods/exercise-rot-reader.go b/content/methods/exercise-rot-reader.go
index 21aead5..7138d63 100644
--- a/content/methods/exercise-rot-reader.go
+++ b/content/methods/exercise-rot-reader.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/methods/exercise-stringer.go b/content/methods/exercise-stringer.go
index bd9fed5..78f4c4a 100644
--- a/content/methods/exercise-stringer.go
+++ b/content/methods/exercise-stringer.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/images.go b/content/methods/images.go
index 6305e26..4bd6f8f 100644
--- a/content/methods/images.go
+++ b/content/methods/images.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/indirection-values.go b/content/methods/indirection-values.go
index 04e022b..542a5ae 100644
--- a/content/methods/indirection-values.go
+++ b/content/methods/indirection-values.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/indirection.go b/content/methods/indirection.go
index 6b69828..e9e0d06 100644
--- a/content/methods/indirection.go
+++ b/content/methods/indirection.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/interface-values-with-nil.go b/content/methods/interface-values-with-nil.go
index 9c4773a..adb1cea 100644
--- a/content/methods/interface-values-with-nil.go
+++ b/content/methods/interface-values-with-nil.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/interface-values.go b/content/methods/interface-values.go
index 82d096f..6090167 100644
--- a/content/methods/interface-values.go
+++ b/content/methods/interface-values.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/interfaces-are-satisfied-implicitly.go b/content/methods/interfaces-are-satisfied-implicitly.go
index 9cc9bd3..ce3fa77 100644
--- a/content/methods/interfaces-are-satisfied-implicitly.go
+++ b/content/methods/interfaces-are-satisfied-implicitly.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/interfaces.go b/content/methods/interfaces.go
index d059f9f..60bf335 100644
--- a/content/methods/interfaces.go
+++ b/content/methods/interfaces.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/methods/methods-continued.go b/content/methods/methods-continued.go
index 6710d1b..be9253a 100644
--- a/content/methods/methods-continued.go
+++ b/content/methods/methods-continued.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/methods-funcs.go b/content/methods/methods-funcs.go
index 476f0cf..bff591a 100644
--- a/content/methods/methods-funcs.go
+++ b/content/methods/methods-funcs.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/methods-pointers-explained.go b/content/methods/methods-pointers-explained.go
index db9107a..f27ec99 100644
--- a/content/methods/methods-pointers-explained.go
+++ b/content/methods/methods-pointers-explained.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/methods-pointers.go b/content/methods/methods-pointers.go
index cd88f46..2491542 100644
--- a/content/methods/methods-pointers.go
+++ b/content/methods/methods-pointers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/methods-with-pointer-receivers.go b/content/methods/methods-with-pointer-receivers.go
index d93ccde..00f5292 100644
--- a/content/methods/methods-with-pointer-receivers.go
+++ b/content/methods/methods-with-pointer-receivers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/methods.go b/content/methods/methods.go
index 692a095..bd8da04 100644
--- a/content/methods/methods.go
+++ b/content/methods/methods.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/nil-interface-values.go b/content/methods/nil-interface-values.go
index 55dbf86..c121282 100644
--- a/content/methods/nil-interface-values.go
+++ b/content/methods/nil-interface-values.go
@@ -1,4 +1,4 @@
-// +build no-run OMIT
+//go:build norun || OMIT
package main
diff --git a/content/methods/reader.go b/content/methods/reader.go
index 4c97eb4..970ca70 100644
--- a/content/methods/reader.go
+++ b/content/methods/reader.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/stringer.go b/content/methods/stringer.go
index 10944b9..9b905f7 100644
--- a/content/methods/stringer.go
+++ b/content/methods/stringer.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/methods/type-assertions.go b/content/methods/type-assertions.go
index 7e81499..dac657f 100644
--- a/content/methods/type-assertions.go
+++ b/content/methods/type-assertions.go
@@ -1,4 +1,4 @@
-// +build no-run OMIT
+//go:build norun || OMIT
package main
diff --git a/content/methods/type-switches.go b/content/methods/type-switches.go
index 3424b79..9346bdd 100644
--- a/content/methods/type-switches.go
+++ b/content/methods/type-switches.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/append.go b/content/moretypes/append.go
index 3e33d98..906057f 100644
--- a/content/moretypes/append.go
+++ b/content/moretypes/append.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/array.go b/content/moretypes/array.go
index 8d73573..3503aea 100644
--- a/content/moretypes/array.go
+++ b/content/moretypes/array.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/exercise-fibonacci-closure.go b/content/moretypes/exercise-fibonacci-closure.go
index f5125e3..b33a154 100644
--- a/content/moretypes/exercise-fibonacci-closure.go
+++ b/content/moretypes/exercise-fibonacci-closure.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/moretypes/exercise-maps.go b/content/moretypes/exercise-maps.go
index 71143b8..326f242 100644
--- a/content/moretypes/exercise-maps.go
+++ b/content/moretypes/exercise-maps.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/exercise-slices.go b/content/moretypes/exercise-slices.go
index ee766ef..2c9230e 100644
--- a/content/moretypes/exercise-slices.go
+++ b/content/moretypes/exercise-slices.go
@@ -1,4 +1,4 @@
-// +build no-build OMIT
+//go:build nobuild || OMIT
package main
diff --git a/content/moretypes/function-closures.go b/content/moretypes/function-closures.go
index df09995..0e4b14e 100644
--- a/content/moretypes/function-closures.go
+++ b/content/moretypes/function-closures.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/function-values.go b/content/moretypes/function-values.go
index 0527d71..6ccdd55 100644
--- a/content/moretypes/function-values.go
+++ b/content/moretypes/function-values.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/making-slices.go b/content/moretypes/making-slices.go
index 2dae8de..5808b00 100644
--- a/content/moretypes/making-slices.go
+++ b/content/moretypes/making-slices.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/map-literals-continued.go b/content/moretypes/map-literals-continued.go
index 3a78844..eb35a2d 100644
--- a/content/moretypes/map-literals-continued.go
+++ b/content/moretypes/map-literals-continued.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/map-literals.go b/content/moretypes/map-literals.go
index 9aca19a..2559624 100644
--- a/content/moretypes/map-literals.go
+++ b/content/moretypes/map-literals.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/maps.go b/content/moretypes/maps.go
index 17727b7..d6c23a7 100644
--- a/content/moretypes/maps.go
+++ b/content/moretypes/maps.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/mutating-maps.go b/content/moretypes/mutating-maps.go
index 2c3d048..18427f8 100644
--- a/content/moretypes/mutating-maps.go
+++ b/content/moretypes/mutating-maps.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/nil-slices.go b/content/moretypes/nil-slices.go
index a317027..ae42f35 100644
--- a/content/moretypes/nil-slices.go
+++ b/content/moretypes/nil-slices.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/pointers.go b/content/moretypes/pointers.go
index 09e8aca..e2685f9 100644
--- a/content/moretypes/pointers.go
+++ b/content/moretypes/pointers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/range-continued.go b/content/moretypes/range-continued.go
index feae06b..df66a25 100644
--- a/content/moretypes/range-continued.go
+++ b/content/moretypes/range-continued.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/range.go b/content/moretypes/range.go
index 193c961..8b83539 100644
--- a/content/moretypes/range.go
+++ b/content/moretypes/range.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slice-bounds.go b/content/moretypes/slice-bounds.go
index 1ba3963..7cd3a7a 100644
--- a/content/moretypes/slice-bounds.go
+++ b/content/moretypes/slice-bounds.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slice-len-cap.go b/content/moretypes/slice-len-cap.go
index a1c5764..f4f37d8 100644
--- a/content/moretypes/slice-len-cap.go
+++ b/content/moretypes/slice-len-cap.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slice-literals.go b/content/moretypes/slice-literals.go
index 5a98010..f62561e 100644
--- a/content/moretypes/slice-literals.go
+++ b/content/moretypes/slice-literals.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slices-of-slice.go b/content/moretypes/slices-of-slice.go
index eb1a442..759cf68 100644
--- a/content/moretypes/slices-of-slice.go
+++ b/content/moretypes/slices-of-slice.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slices-pointers.go b/content/moretypes/slices-pointers.go
index 193b463..adb7385 100644
--- a/content/moretypes/slices-pointers.go
+++ b/content/moretypes/slices-pointers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/slices.go b/content/moretypes/slices.go
index 7720f84..181d736 100644
--- a/content/moretypes/slices.go
+++ b/content/moretypes/slices.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/struct-fields.go b/content/moretypes/struct-fields.go
index b85607f..bb71288 100644
--- a/content/moretypes/struct-fields.go
+++ b/content/moretypes/struct-fields.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/struct-literals.go b/content/moretypes/struct-literals.go
index 4c86016..f7bb5c5 100644
--- a/content/moretypes/struct-literals.go
+++ b/content/moretypes/struct-literals.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/struct-pointers.go b/content/moretypes/struct-pointers.go
index 901f003..459c1d4 100644
--- a/content/moretypes/struct-pointers.go
+++ b/content/moretypes/struct-pointers.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/moretypes/structs.go b/content/moretypes/structs.go
index 253a4fd..52edb8d 100644
--- a/content/moretypes/structs.go
+++ b/content/moretypes/structs.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/welcome/hello.go b/content/welcome/hello.go
index b480451..81890c5 100644
--- a/content/welcome/hello.go
+++ b/content/welcome/hello.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/content/welcome/sandbox.go b/content/welcome/sandbox.go
index d93d542..c90b292 100644
--- a/content/welcome/sandbox.go
+++ b/content/welcome/sandbox.go
@@ -1,4 +1,4 @@
-// +build OMIT
+//go:build OMIT
package main
diff --git a/solutions/binarytrees.go b/solutions/binarytrees.go
index fe47542..60e7379 100644
--- a/solutions/binarytrees.go
+++ b/solutions/binarytrees.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/binarytrees_quit.go b/solutions/binarytrees_quit.go
index a469767..1237b10 100644
--- a/solutions/binarytrees_quit.go
+++ b/solutions/binarytrees_quit.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/errors.go b/solutions/errors.go
index e8de49e..d6232b8 100644
--- a/solutions/errors.go
+++ b/solutions/errors.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/fib.go b/solutions/fib.go
index 0f3959a..cfab7a8 100644
--- a/solutions/fib.go
+++ b/solutions/fib.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/http.go b/solutions/http.go
index 9fe3d5f..7893791 100644
--- a/solutions/http.go
+++ b/solutions/http.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/image.go b/solutions/image.go
index bdba7af..8d218df 100644
--- a/solutions/image.go
+++ b/solutions/image.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/loops.go b/solutions/loops.go
index 296138f..7d8a4ae 100644
--- a/solutions/loops.go
+++ b/solutions/loops.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/maps.go b/solutions/maps.go
index f2565a0..1d99b7f 100644
--- a/solutions/maps.go
+++ b/solutions/maps.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/readers.go b/solutions/readers.go
index ba7036d..78b57e7 100644
--- a/solutions/readers.go
+++ b/solutions/readers.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/rot13.go b/solutions/rot13.go
index 84315a4..d2ce0cb 100644
--- a/solutions/rot13.go
+++ b/solutions/rot13.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/slices.go b/solutions/slices.go
index d66ed02..8439ea9 100644
--- a/solutions/slices.go
+++ b/solutions/slices.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/stringers.go b/solutions/stringers.go
index 7462f4c..3faf812 100644
--- a/solutions/stringers.go
+++ b/solutions/stringers.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main
diff --git a/solutions/webcrawler.go b/solutions/webcrawler.go
index 89b86a8..27df5da 100644
--- a/solutions/webcrawler.go
+++ b/solutions/webcrawler.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
+//go:build ignore
package main