Skip to content

ref(templates/go): use spinframework import path #3116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions templates/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about this Makefile. Just a note that I don't think it is being invoked anymore, now that the go and rust SDKs live in their own repo. We can remove - unless you're finding it useful for bumps like these.

Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
SDK_VERSION ?= v0.0.0
CRATES_IO_VERSION := $(shell echo "${SDK_VERSION}" | tr -d 'v')

bump-versions: bump-go-versions bump-rust-versions

bump-go-versions:
@for dir in $$(ls -d *-go) ; do \
cd $$dir/content ; \
sed -r -i.sed-bak -e 's%require github.com/fermyon/spin/sdk/go/v2 [-a-zA-Z0-9.]+%require github.com/fermyon/spin/sdk/go/v2 ${SDK_VERSION}%g' go.mod ; \
sed -i.sed-bak -e 's/{{project-name | snake_case}}/foo/g' go.mod ; \
go get -u github.com/spinframework/spin-go-sdk ; \
go mod tidy ; \
sed -i.sed-bak -e 's/foo/{{project-name | snake_case}}/g' go.mod ; \
rm *.sed-bak ; \
Expand Down
2 changes: 1 addition & 1 deletion templates/http-go/content/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/{{project-name | snake_case}}

go 1.22

require github.com/fermyon/spin/sdk/go/v2 v2.2.0
require github.com/spinframework/spin-go-sdk v0.0.0-20250411015808-ee0bd1e7d170

require github.com/julienschmidt/httprouter v1.3.0 // indirect
4 changes: 2 additions & 2 deletions templates/http-go/content/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/fermyon/spin/sdk/go/v2 v2.2.0 h1:zHZdIqjbUwyxiwdygHItnM+vUUNSZ3CX43jbIUemBI4=
github.com/fermyon/spin/sdk/go/v2 v2.2.0/go.mod h1:kfJ+gdf/xIaKrsC6JHCUDYMv2Bzib1ohFIYUzvP+SCw=
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 v0.0.0-20250411015808-ee0bd1e7d170 h1:juNekE6jdrv6p7WtGGBTunnz4T0KNmcFh3Ar9DLIgCQ=
github.com/spinframework/spin-go-sdk v0.0.0-20250411015808-ee0bd1e7d170/go.mod h1:e5+1n8xZksPGEpspNjTZ03vYe1qIK6Jb+k/OVja5QWU=
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/fermyon/spin/sdk/go/v2/http"
spinhttp "github.com/spinframework/spin-go-sdk/http"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion templates/redis-go/content/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/{{project-name | snake_case}}

go 1.22

require github.com/fermyon/spin/sdk/go/v2 v2.2.0
require github.com/spinframework/spin-go-sdk v0.0.0-20250411015808-ee0bd1e7d170
4 changes: 2 additions & 2 deletions templates/redis-go/content/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/fermyon/spin/sdk/go/v2 v2.2.0 h1:zHZdIqjbUwyxiwdygHItnM+vUUNSZ3CX43jbIUemBI4=
github.com/fermyon/spin/sdk/go/v2 v2.2.0/go.mod h1:kfJ+gdf/xIaKrsC6JHCUDYMv2Bzib1ohFIYUzvP+SCw=
github.com/spinframework/spin-go-sdk v0.0.0-20250411015808-ee0bd1e7d170 h1:juNekE6jdrv6p7WtGGBTunnz4T0KNmcFh3Ar9DLIgCQ=
github.com/spinframework/spin-go-sdk v0.0.0-20250411015808-ee0bd1e7d170/go.mod h1:e5+1n8xZksPGEpspNjTZ03vYe1qIK6Jb+k/OVja5QWU=
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/fermyon/spin/sdk/go/v2/redis"
"github.com/spinframework/spin-go-sdk/redis"
)

func init() {
Expand Down
Loading