Skip to content

Commit df44826

Browse files
updating documentation and switching to 1.21
1 parent 7e7471a commit df44826

File tree

16 files changed

+42
-39
lines changed

16 files changed

+42
-39
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
steps:
1111
- checkout
1212
- run:
13-
name: Install Go 1.20
13+
name: Install Go 1.21
1414
command: |
1515
sudo rm -rf /usr/local/go
16-
wget -O go.tgz https://dl.google.com/go/go1.20.linux-amd64.tar.gz
16+
wget -O go.tgz https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
1717
sudo tar -C /usr/local -xzf go.tgz
1818
which go
1919
go version

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/ardanlabs/gotraining
22

3-
go 1.19
3+
go 1.21
44

55
require (
66
github.com/braintree/manners v0.0.0-20160418043613-82a8879fc5fd

reading/README.md

+22-21
Original file line numberDiff line numberDiff line change
@@ -419,27 +419,28 @@ https://godoc.org/golang.org/x/tools/go/ssa
419419

420420
[Open issues for the upcoming release](https://dev.golang.org/release)
421421

422-
[Go 1.20 Release Notes](https://golang.org/doc/go1.20) - 2023/02/01
423-
[Go 1.19 Release Notes](https://golang.org/doc/go1.19) - 2022/08/02
424-
[Go 1.18 Release Notes](https://golang.org/doc/go1.18) - 2022/03/15
425-
[Go 1.17 Release Notes](https://golang.org/doc/go1.17) - 2021/08/16
426-
[Go 1.16 Release Notes](https://golang.org/doc/go1.16) - 2021/02/16
427-
[Go 1.15 Release Notes](https://golang.org/doc/go1.15) - 2020/08/11
428-
[Go 1.14 Release Notes](https://golang.org/doc/go1.14) - 2020/02/25
429-
[Go 1.13 Release Notes](https://golang.org/doc/go1.13) - 2019/09/03
430-
[Go 1.12 Release Notes](https://golang.org/doc/go1.12) - 2019/02/25
431-
[Go 1.11 Release Notes](https://golang.org/doc/go1.11) - 2018/08/24
432-
[Go 1.10 Release Notes](https://golang.org/doc/go1.10) - 2018/02/16
433-
[Go 1.09 Release Notes](https://golang.org/doc/go1.9) - 2017/08/24
434-
[Go 1.08 Release Notes](https://golang.org/doc/go1.8) - 2017/02/16
435-
[Go 1.07 Release Notes](https://golang.org/doc/go1.7) - 2016/08/15
436-
[Go 1.06 Release Notes](https://golang.org/doc/go1.6) - 2016/02/17
437-
[Go 1.05 Release Notes](https://golang.org/doc/go1.5) - 2015/08/19
438-
[Go 1.04 Release Notes](https://golang.org/doc/go1.4) - 2014/12/10
439-
[Go 1.03 Release Notes](https://golang.org/doc/go1.3) - 2014/06/18
440-
[Go 1.02 Release Notes](https://golang.org/doc/go1.2) - 2013/12/01
441-
[Go 1.01 Release Notes](https://golang.org/doc/go1.1) - 2013/05/13
442-
[Go 1.00 Release Notes](https://golang.org/doc/go1.0) - 2012/03/28
422+
[Go 1.21 Release Notes](https://go.dev/doc/go1.21) - 2023/08/08
423+
[Go 1.20 Release Notes](https://go.dev/doc/go1.20) - 2023/02/01
424+
[Go 1.19 Release Notes](https://go.dev/doc/go1.19) - 2022/08/02
425+
[Go 1.18 Release Notes](https://go.dev/doc/go1.18) - 2022/03/15
426+
[Go 1.17 Release Notes](https://go.dev/doc/go1.17) - 2021/08/16
427+
[Go 1.16 Release Notes](https://go.dev/doc/go1.16) - 2021/02/16
428+
[Go 1.15 Release Notes](https://go.dev/doc/go1.15) - 2020/08/11
429+
[Go 1.14 Release Notes](https://go.dev/doc/go1.14) - 2020/02/25
430+
[Go 1.13 Release Notes](https://go.dev/doc/go1.13) - 2019/09/03
431+
[Go 1.12 Release Notes](https://go.dev/doc/go1.12) - 2019/02/25
432+
[Go 1.11 Release Notes](https://go.dev/doc/go1.11) - 2018/08/24
433+
[Go 1.10 Release Notes](https://go.dev/doc/go1.10) - 2018/02/16
434+
[Go 1.09 Release Notes](https://go.dev/doc/go1.9) - 2017/08/24
435+
[Go 1.08 Release Notes](https://go.dev/doc/go1.8) - 2017/02/16
436+
[Go 1.07 Release Notes](https://go.dev/doc/go1.7) - 2016/08/15
437+
[Go 1.06 Release Notes](https://go.dev/doc/go1.6) - 2016/02/17
438+
[Go 1.05 Release Notes](https://go.dev/doc/go1.5) - 2015/08/19
439+
[Go 1.04 Release Notes](https://go.dev/doc/go1.4) - 2014/12/10
440+
[Go 1.03 Release Notes](https://go.dev/doc/go1.3) - 2014/06/18
441+
[Go 1.02 Release Notes](https://go.dev/doc/go1.2) - 2013/12/01
442+
[Go 1.01 Release Notes](https://go.dev/doc/go1.1) - 2013/05/13
443+
[Go 1.00 Release Notes](https://go.dev/doc/go1) - 2012/03/28
443444

444445

445446
## Research Papers

topics/go/packages/slices/example1/example1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package main
88
import (
99
"fmt"
1010

11-
"golang.org/x/exp/slices"
11+
"slices"
1212
)
1313

1414
// BinarySearch searches for target in a sorted slice and returns the

topics/go/packages/slices/example10/example10.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Index returns the index of the first occurrence or -1 if not present.

topics/go/packages/slices/example11/example11.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Insert adds values into the slices at the specified index and

topics/go/packages/slices/example12/example12.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Sort sorts a slice of any ordered type in ascending order.
@@ -52,6 +52,8 @@ func main() {
5252
fmt.Println("Is list sorted:", is)
5353
}
5454

55-
func compare(a, b int) bool {
56-
return a < b
55+
// Compare needs to return 0 if the two values are the same, a positive
56+
// number of a > b, and a negative number of a < b.
57+
func compare(a, b int) int {
58+
return a - b
5759
}

topics/go/packages/slices/example13/example13.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Replace replaces the elements specified for a given range and returns

topics/go/packages/slices/example2/example2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Clip removes the unused capacity from the slice.

topics/go/packages/slices/example3/example3.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Clone creates a new slice value and underlying array with a shallow

topics/go/packages/slices/example4/example4.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Compact replaces consecutive runs of equal elements with a single copy.

topics/go/packages/slices/example5/example5.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// result translates the result of the compare API.

topics/go/packages/slices/example6/example6.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Contains reports whether a specified value is present in slice.

topics/go/packages/slices/example7/example7.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Delete removes a contiguous set of elements from the slice.

topics/go/packages/slices/example8/example8.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Equal reports whether two slices are equal by comparing the length of

topics/go/packages/slices/example9/example9.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
import (
88
"fmt"
99

10-
"golang.org/x/exp/slices"
10+
"slices"
1111
)
1212

1313
// Grow increases the slice's capacity to guarantee space for another n elements.

0 commit comments

Comments
 (0)