From 79aa2221ec4767708d96cdd5e53653869f6d9782 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Wed, 16 Apr 2025 15:05:11 -0700 Subject: [PATCH] ref(templates/go): use spinframework import path Signed-off-by: Adam Reese --- templates/Makefile | 3 +-- templates/http-go/content/go.mod | 2 +- templates/http-go/content/go.sum | 4 ++-- templates/http-go/content/main.go | 2 +- templates/redis-go/content/go.mod | 2 +- templates/redis-go/content/go.sum | 4 ++-- templates/redis-go/content/main.go | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/templates/Makefile b/templates/Makefile index 25c454a98c..d005e3ae51 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -1,4 +1,3 @@ -SDK_VERSION ?= v0.0.0 CRATES_IO_VERSION := $(shell echo "${SDK_VERSION}" | tr -d 'v') bump-versions: bump-go-versions bump-rust-versions @@ -6,8 +5,8 @@ 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 ; \ diff --git a/templates/http-go/content/go.mod b/templates/http-go/content/go.mod index b395dc51e4..7a9a95ca93 100644 --- a/templates/http-go/content/go.mod +++ b/templates/http-go/content/go.mod @@ -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 diff --git a/templates/http-go/content/go.sum b/templates/http-go/content/go.sum index c283accd85..bca755e803 100644 --- a/templates/http-go/content/go.sum +++ b/templates/http-go/content/go.sum @@ -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= diff --git a/templates/http-go/content/main.go b/templates/http-go/content/main.go index fc8a531815..d416cb8e4b 100644 --- a/templates/http-go/content/main.go +++ b/templates/http-go/content/main.go @@ -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() { diff --git a/templates/redis-go/content/go.mod b/templates/redis-go/content/go.mod index 014c36d49b..39c107ecf8 100644 --- a/templates/redis-go/content/go.mod +++ b/templates/redis-go/content/go.mod @@ -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 diff --git a/templates/redis-go/content/go.sum b/templates/redis-go/content/go.sum index 69abe73b9c..920bd4e0a4 100644 --- a/templates/redis-go/content/go.sum +++ b/templates/redis-go/content/go.sum @@ -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= diff --git a/templates/redis-go/content/main.go b/templates/redis-go/content/main.go index cf7ce8137d..97e21d68b0 100644 --- a/templates/redis-go/content/main.go +++ b/templates/redis-go/content/main.go @@ -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() {