Skip to content

Commit

Permalink
Update to go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
slimslenderslacks committed Oct 9, 2024
1 parent b9cb31e commit b920a03
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions functions/tree-sitter/cmd/ts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import (
"github.com/smacker/go-tree-sitter/bash"
"github.com/smacker/go-tree-sitter/html"
"github.com/smacker/go-tree-sitter/dockerfile"
"github.com/smacker/go-tree-sitter/golang"
"github.com/smacker/go-tree-sitter/java"
"github.com/smacker/go-tree-sitter/javascript"
markdown "github.com/smacker/go-tree-sitter/markdown/tree-sitter-markdown"
typescript "github.com/smacker/go-tree-sitter/typescript/typescript"
tsx "github.com/smacker/go-tree-sitter/typescript/tsx"
)

func main() {
Expand Down Expand Up @@ -52,6 +57,16 @@ func main() {
lang = dockerfile.GetLanguage()
case "markdown":
lang = markdown.GetLanguage()
case "golang":
lang = golang.GetLanguage()
case "java":
lang = java.GetLanguage()
case "javascript":
lang = javascript.GetLanguage()
case "typescript":
lang = typescript.GetLanguage()
case "tsx":
lang = tsx.GetLanguage()
default:
fmt.Printf("Unsupported language: %s\n", language)
return
Expand Down
2 changes: 1 addition & 1 deletion functions/tree-sitter/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# If you're not using vendored dependencies, compute the hash of your go.mod and go.sum
# You can get this hash by first setting it to lib.fakeSha256,
# then running the build and replacing it with the correct hash
vendorHash = "sha256-ZAlkGegeFLqvHlGD1oA08NS216r6WsWFkajzxI+jLX4=";
vendorHash = "sha256-/X9cuzpVzVOqcON3c2GtUwCXi6gfFzjjQ8r+D0Yhgu8=";

# Specify the package to build if it's not in the root of your project
subPackages = [ "cmd/ts" ];
Expand Down
2 changes: 1 addition & 1 deletion functions/tree-sitter/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module tree-sitter-query

go 1.20
go 1.22

require github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82
1 change: 1 addition & 0 deletions functions/tree-sitter/runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ docker buildx build \
--tag vonwig/tree-sitter:latest \
--file Dockerfile \
--push .
docker pull vonwig/tree-sitter:latest
```

```sh
Expand Down

0 comments on commit b920a03

Please sign in to comment.