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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
version: '0.14.1'
- uses: actions/setup-go@v4
with:
go-version: '1.23'
go-version: '1.25'
cache-dependency-path: "**/go.sum" # To suppress warning: https://github.com/actions/setup-go/issues/427
- uses: acifani/setup-tinygo@v2
with:
Expand Down
14 changes: 11 additions & 3 deletions templates/http-go/content/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
module github.com/{{project-name | snake_case}}

go 1.22
go 1.25.5

require github.com/spinframework/spin-go-sdk/v2 v2.2.1
require github.com/spinframework/spin-go-sdk/v3 v3.0.0

require github.com/julienschmidt/httprouter v1.3.0 // indirect
require (
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13 // indirect
github.com/bytecodealliance/componentize-go v0.3.3 // indirect
github.com/gofrs/flock v0.13.0 // indirect
go.bytecodealliance.org/pkg v0.2.1 // indirect
golang.org/x/sys v0.37.0 // indirect
)

tool github.com/bytecodealliance/componentize-go
27 changes: 23 additions & 4 deletions templates/http-go/content/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/spinframework/spin-go-sdk/v2 v2.2.1 h1:ceAbRU+D3xmyZ8ScDLeFoT763ikFIUEmSjgsrD11v8k=
github.com/spinframework/spin-go-sdk/v2 v2.2.1/go.mod h1:vocVZB4qlTG8C5yoliKIAJCuv4x7sqK0GmVkWeD9N/A=
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13 h1:JtuelWqyixKApmXm3qghhZ7O96P6NKpyrlSIe8Rwnhw=
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13/go.mod h1:7kfpUbyCdGJ9fDRCp3fopPQi5+cKNHgTE4ZuNrO71Cw=
github.com/bytecodealliance/componentize-go v0.3.3 h1:8OA2qjWQA45vTMy5e1dboCOBqhAArUfMtVWlWSLJl/k=
github.com/bytecodealliance/componentize-go v0.3.3/go.mod h1:w1QFtPLGI9o38epvMOPyCKbMc7q7GJ7yZhIvhGTpzA0=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spinframework/spin-go-sdk/v3 v3.0.0 h1:YI5HTK0wXDu6KIZ3dzTqszqhnyGrnt4m7vH9judUkcA=
github.com/spinframework/spin-go-sdk/v3 v3.0.0/go.mod h1:TBYpyA7BXVL/7+uUJrNDA+OdlLFg3+NSvXSK7HVI1N4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.bytecodealliance.org/pkg v0.2.1 h1:TdRagooIcCW3UmlKqVO4cDR3GNDyfDnbiBzGI6TOvyg=
go.bytecodealliance.org/pkg v0.2.1/go.mod h1:OjA+V8g3uUFixeCKFfamm6sYhTJdg8fvwEdJ2GO0GSk=
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 4 additions & 1 deletion templates/http-go/content/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
spinhttp "github.com/spinframework/spin-go-sdk/v3/http"
)

func init() {
Expand All @@ -13,3 +13,6 @@ func init() {
fmt.Fprintln(w, "Hello World!")
})
}

// main function must be included for the compiler but is not executed.
func main() {}
2 changes: 1 addition & 1 deletion templates/http-go/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ component = "{{project-name | kebab_case}}"
source = "main.wasm"
allowed_outbound_hosts = []
[component.{{project-name | kebab_case}}.build]
command = "tinygo build -target=wasip1 -buildmode=c-shared -no-debug -o main.wasm ."
command = "go tool componentize-go build"
watch = ["**/*.go", "go.mod"]
2 changes: 1 addition & 1 deletion templates/http-go/metadata/spin-template.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
manifest_version = "1"
id = "http-go"
description = "HTTP request handler using (Tiny)Go"
description = "HTTP request handler using Go"
tags = ["http", "go"]

[add_component]
Expand Down
14 changes: 12 additions & 2 deletions templates/redis-go/content/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
module github.com/{{project-name | snake_case}}

go 1.22
go 1.25.5

require github.com/spinframework/spin-go-sdk/v2 v2.2.1
require github.com/spinframework/spin-go-sdk/v3 v3.0.0

require (
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13 // indirect
github.com/bytecodealliance/componentize-go v0.3.3 // indirect
github.com/gofrs/flock v0.13.0 // indirect
go.bytecodealliance.org/pkg v0.2.1 // indirect
golang.org/x/sys v0.37.0 // indirect
)

tool github.com/bytecodealliance/componentize-go
25 changes: 23 additions & 2 deletions templates/redis-go/content/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
github.com/spinframework/spin-go-sdk/v2 v2.2.1 h1:ceAbRU+D3xmyZ8ScDLeFoT763ikFIUEmSjgsrD11v8k=
github.com/spinframework/spin-go-sdk/v2 v2.2.1/go.mod h1:vocVZB4qlTG8C5yoliKIAJCuv4x7sqK0GmVkWeD9N/A=
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13 h1:JtuelWqyixKApmXm3qghhZ7O96P6NKpyrlSIe8Rwnhw=
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13/go.mod h1:7kfpUbyCdGJ9fDRCp3fopPQi5+cKNHgTE4ZuNrO71Cw=
github.com/bytecodealliance/componentize-go v0.3.3 h1:8OA2qjWQA45vTMy5e1dboCOBqhAArUfMtVWlWSLJl/k=
github.com/bytecodealliance/componentize-go v0.3.3/go.mod h1:w1QFtPLGI9o38epvMOPyCKbMc7q7GJ7yZhIvhGTpzA0=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spinframework/spin-go-sdk/v3 v3.0.0 h1:YI5HTK0wXDu6KIZ3dzTqszqhnyGrnt4m7vH9judUkcA=
github.com/spinframework/spin-go-sdk/v3 v3.0.0/go.mod h1:TBYpyA7BXVL/7+uUJrNDA+OdlLFg3+NSvXSK7HVI1N4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.bytecodealliance.org/pkg v0.2.1 h1:TdRagooIcCW3UmlKqVO4cDR3GNDyfDnbiBzGI6TOvyg=
go.bytecodealliance.org/pkg v0.2.1/go.mod h1:OjA+V8g3uUFixeCKFfamm6sYhTJdg8fvwEdJ2GO0GSk=
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 4 additions & 1 deletion templates/redis-go/content/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/spinframework/spin-go-sdk/v2/redis"
"github.com/spinframework/spin-go-sdk/v3/redis"
)

func init() {
Expand All @@ -14,3 +14,6 @@ func init() {
return nil
})
}

// main function must be included for the compiler but is not executed.
func main() {}
2 changes: 1 addition & 1 deletion templates/redis-go/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ component = "{{project-name | kebab_case}}"
source = "main.wasm"
allowed_outbound_hosts = []
[component.{{project-name | kebab_case}}.build]
command = "tinygo build -target=wasip1 -gc=leaking -buildmode=c-shared -no-debug -o main.wasm ."
command = "go tool componentize-go -w spin:up/redis-trigger@4.0.0 build"
2 changes: 1 addition & 1 deletion templates/redis-go/metadata/spin-template.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
manifest_version = "1"
id = "redis-go"
description = "Redis message handler using (Tiny)Go"
description = "Redis message handler using Go"
tags = ["redis", "go"]

[parameters]
Expand Down
Loading