diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 97c4813..a8f932c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -18,13 +18,13 @@ jobs: steps: - name: Set up Go 1.21 - uses: actions/setup-go@v1 + uses: actions/setup-go@v5 with: go-version: '1.21' id: go - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Get dependencies run: | diff --git a/.github/workflows/goci.yml b/.github/workflows/goci.yml index 7f575a8..ec4de54 100644 --- a/.github/workflows/goci.yml +++ b/.github/workflows/goci.yml @@ -16,10 +16,10 @@ jobs: name: run runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.21' diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 5e7579d..4d913fb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -15,11 +15,11 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.21' cache: false - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: diff --git a/cmd/main.go b/cmd/main.go index ce23826..149d125 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -27,9 +27,9 @@ func main() { fmt.Println(ok) // true fmt.Println(root.GetData()) // 0.0 - node, ok := tr.Get(3) - fmt.Println(ok) // true - fmt.Println(node.GetData()) // 1.3 + found, ok := tr.Get(3) + fmt.Println(ok) // true + fmt.Println(found.GetData()) // 1.3 structure, ok := tr.GetStructure() fmt.Println(ok) // true @@ -37,7 +37,7 @@ func main() { nodes, ok := tr.Backtrack(6) fmt.Println(ok) // true - for _, node := range nodes { - fmt.Println(node.GetData()) // 2.6; 0.2; 0.0 + for _, n := range nodes { + fmt.Println(n.GetData()) // 2.6; 0.2; 0.0 } }