Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
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.1 // indirect
Comment thread
fibonacci1729 marked this conversation as resolved.
Outdated
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
2 changes: 1 addition & 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 Down
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.1 // indirect
Comment thread
fibonacci1729 marked this conversation as resolved.
Outdated
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
2 changes: 1 addition & 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 Down
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/http-trigger@4.0.0 -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