Skip to content

Commit 171e257

Browse files
housemejohnfercher
andauthored
feat: Unify and update the setup- go and checkout in the action operation to the latest version (#15)
* feat: Unify and update the `setup- go` and `checkout` in the `action` operation to the latest version * fix: revert go.mod version --------- Co-authored-by: John Fercher <[email protected]>
1 parent c06e6c6 commit 171e257

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
steps:
1919

2020
- name: Set up Go 1.21
21-
uses: actions/setup-go@v1
21+
uses: actions/setup-go@v5
2222
with:
2323
go-version: '1.21'
2424
id: go
2525

2626
- name: Check out code into the Go module directory
27-
uses: actions/checkout@v1
27+
uses: actions/checkout@v4
2828

2929
- name: Get dependencies
3030
run: |

.github/workflows/goci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
name: run
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v4
22+
uses: actions/setup-go@v5
2323
with:
2424
go-version: '1.21'
2525

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
lint:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/setup-go@v4
18+
- uses: actions/setup-go@v5
1919
with:
2020
go-version: '1.21'
2121
cache: false
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v3
2525
with:

cmd/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ func main() {
2727
fmt.Println(ok) // true
2828
fmt.Println(root.GetData()) // 0.0
2929

30-
node, ok := tr.Get(3)
31-
fmt.Println(ok) // true
32-
fmt.Println(node.GetData()) // 1.3
30+
found, ok := tr.Get(3)
31+
fmt.Println(ok) // true
32+
fmt.Println(found.GetData()) // 1.3
3333

3434
structure, ok := tr.GetStructure()
3535
fmt.Println(ok) // true
3636
fmt.Println(structure) // (NULL) -> (0), (0) -> (1), (1) -> (3), (1) -> (4), (0) -> (2), (2) -> (5), (2) -> (6)
3737

3838
nodes, ok := tr.Backtrack(6)
3939
fmt.Println(ok) // true
40-
for _, node := range nodes {
41-
fmt.Println(node.GetData()) // 2.6; 0.2; 0.0
40+
for _, n := range nodes {
41+
fmt.Println(n.GetData()) // 2.6; 0.2; 0.0
4242
}
4343
}

0 commit comments

Comments
 (0)