Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ 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
fmt.Println(structure) // (NULL) -> (0), (0) -> (1), (1) -> (3), (1) -> (4), (0) -> (2), (2) -> (5), (2) -> (6)

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
}
}