Skip to content

Update Go import paths to spinframework #116

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
6 changes: 3 additions & 3 deletions content/v2/ai-sentiment-analysis-api-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ import (
"net/http"
"strings"

spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/kv"
"github.com/fermyon/spin/sdk/go/v2/llm"
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/kv"
"github.com/spinframework/spin-go-sdk/v2/llm"
)

type sentimentAnalysisRequest struct {
Expand Down
12 changes: 6 additions & 6 deletions content/v2/go-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Using TinyGo to compile components for Spin is currently required, as the

> All examples from this page can be found in [the Spin Go SDK repository on GitHub](https://github.com/spinframework/spin-go-sdk/tree/main/examples).

[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2)

## Versions

Expand All @@ -52,7 +52,7 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down Expand Up @@ -124,7 +124,7 @@ import (
"net/http"
"os"

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

func init() {
Expand Down Expand Up @@ -217,7 +217,7 @@ package main
import (
"fmt"

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

func init() {
Expand Down Expand Up @@ -309,8 +309,8 @@ import (
"net/http"
"os"

spin_http "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/redis"
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/redis"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v2/http-outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ You can find a complete example for using outbound HTTP in the [Python SDK repos

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)

HTTP functions are available in the `github.com/fermyon/spin/sdk/go/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:
HTTP functions are available in the `github.com/spinframework/spin-go-sdk/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:

```go
import (
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
)

res1, err1 := spinhttp.Get("https://random-data-api.fermyon.app/animals/json")
Expand Down
4 changes: 2 additions & 2 deletions content/v2/http-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)

In Go, you register the handler as a callback in your program's `init` function. Call `spinhttp.Handle`, passing your handler as the sole argument. Your handler takes a `http.Request` record, from the standard `net/http` package, and a `ResponseWriter` to construct the response.

Expand All @@ -318,7 +318,7 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down
4 changes: 2 additions & 2 deletions content/v2/key-value-store-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ import (
"net/http"
"fmt"

spin_http "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/kv"
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/kv"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v2/kv-store-api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/kv)
> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/kv)

Key value functions are provided by the `github.com/fermyon/spin/sdk/go/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/kv) For example:
Key value functions are provided by the `github.com/spinframework/spin-go-sdk/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/kv) For example:

```go
import "github.com/fermyon/spin/sdk/go/v2/kv"
import "github.com/spinframework/spin-go-sdk/v2/kv"

func example() error {
store, err := kv.OpenStore("default")
Expand Down
2 changes: 1 addition & 1 deletion content/v2/language-support-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This page contains information about language support for Spin features:

{{ startTab "TinyGo"}}

**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**
**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**

| Feature | SDK Supported? |
|-----|-----|
Expand Down
2 changes: 1 addition & 1 deletion content/v2/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down
8 changes: 4 additions & 4 deletions content/v2/rdbms-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
> [**Want to go straight to the reference documentation?** Find it here.](github.com/spinframework/spin-go-sdk/v2)

MySQL functions are available in the `github.com/fermyon/spin/sdk/go/v2/mysql` package, and PostgreSQL in `github.com/fermyon/spin/sdk/go/v2/pg`. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
MySQL functions are available in the `github.com/spinframework/spin-go-sdk/v2/mysql` package, and PostgreSQL in `github.com/spinframework/spin-go-sdk/v2/pg`. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2)

The package follows the usual Go database API. Use `Open` to return a connection to the database of type `*sql.DB` - see the [Go standard library documentation](https://pkg.go.dev/database/sql#DB) for usage information. For example:

Expand All @@ -144,8 +144,8 @@ import (
"net/http"
"os"

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

type Pet struct {
Expand Down
6 changes: 3 additions & 3 deletions content/v2/redis-outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ You can find a complete Python code example for using outbound Redis from an HTT

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/redis)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/redis)

Redis functions are available in the `github.com/fermyon/spin/sdk/go/v2/redis` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/redis) The function names are TitleCased. For example:
Redis functions are available in the `github.com/spinframework/spin-go-sdk/v2/redis` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/redis) The function names are TitleCased. For example:

```go
import (
"github.com/fermyon/spin/sdk/go/v2/redis"
"github.com/spinframework/spin-go-sdk/v2/redis"
)

rdb := redis.NewClient(addr)
Expand Down
4 changes: 2 additions & 2 deletions content/v2/redis-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class InboundRedis(exports.InboundRedis):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/redis)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/redis)

In Go, you register the handler as a callback in your program's `init` function. Call `redis.Handle` (from the Spin SDK `redis` package), passing your handler as the sole argument. Your handler takes a single byte slice (`[]byte`) argument, and may return an error or `nil`.

Expand All @@ -128,7 +128,7 @@ package main
import (
"fmt"

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

func init() {
Expand Down
8 changes: 4 additions & 4 deletions content/v2/serverless-ai-api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/llm)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/llm)

Serverless AI functions are available in the `github.com/fermyon/spin/sdk/go/v2/llm` package. See [Go Packages](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/llm) for reference documentation. For example:
Serverless AI functions are available in the `github.com/spinframework/spin-go-sdk/v2/llm` package. See [Go Packages](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/llm) for reference documentation. For example:

```go
package main
Expand All @@ -188,8 +188,8 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v2/sqlite-api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/sqlite)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/sqlite)

The Go SDK is implemented as a driver for the standard library's [database/sql](https://pkg.go.dev/database/sql) interface.

Expand All @@ -185,8 +185,8 @@ import (
"encoding/json"
"net/http"

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

type Todo struct {
Expand Down
8 changes: 4 additions & 4 deletions content/v2/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,18 @@ class IncomingHandler(IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/variables)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/variables)

The function is available in the `github.com/fermyon/spin/sdk/go/v2/variables` package and is named `Get`. See [Go package](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/variables) for reference documentation.
The function is available in the `github.com/spinframework/spin-go-sdk/v2/variables` package and is named `Get`. See [Go package](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/variables) for reference documentation.

```go
import (
"bytes"
"fmt"
"net/http"

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

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v3/ai-sentiment-analysis-api-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ import (
"net/http"
"strings"

spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/kv"
"github.com/fermyon/spin/sdk/go/v2/llm"
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/kv"
"github.com/spinframework/spin-go-sdk/v2/llm"
)

type sentimentAnalysisRequest struct {
Expand Down
12 changes: 6 additions & 6 deletions content/v3/go-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Using TinyGo to compile components for Spin is currently required, as the

> All examples from this page can be found in [the Spin Go SDK repository on GitHub](https://github.com/spinframework/spin-go-sdk/tree/main/examples).

[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2)

## Versions

Expand All @@ -52,7 +52,7 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down Expand Up @@ -122,7 +122,7 @@ import (
"net/http"
"os"

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

func init() {
Expand Down Expand Up @@ -213,7 +213,7 @@ package main
import (
"fmt"

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

func init() {
Expand Down Expand Up @@ -302,8 +302,8 @@ import (
"net/http"
"os"

spin_http "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/redis"
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/redis"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v3/http-outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ You can find a complete example for using outbound HTTP in the [Python SDK repos

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)

HTTP functions are available in the `github.com/fermyon/spin/sdk/go/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:
HTTP functions are available in the `github.com/spinframework/spin-go-sdk/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:

```go
import (
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
)

res1, err1 := spinhttp.Get("https://random-data-api.fermyon.app/animals/json")
Expand Down
4 changes: 2 additions & 2 deletions content/v3/http-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)

In Go, you register the handler as a callback in your program's `init` function. Call `spinhttp.Handle`, passing your handler as the sole argument. Your handler takes a `http.Request` record, from the standard `net/http` package, and a `ResponseWriter` to construct the response.

Expand All @@ -313,7 +313,7 @@ import (
"fmt"
"net/http"

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

func init() {
Expand Down
4 changes: 2 additions & 2 deletions content/v3/key-value-store-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ import (
"net/http"
"fmt"

spin_http "github.com/fermyon/spin/sdk/go/v2/http"
"github.com/fermyon/spin/sdk/go/v2/kv"
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
"github.com/spinframework/spin-go-sdk/v2/kv"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions content/v3/kv-store-api-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ class IncomingHandler(http.IncomingHandler):

{{ startTab "TinyGo"}}

> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/kv)
> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/kv)

Key value functions are provided by the `github.com/fermyon/spin/sdk/go/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/kv) For example:
Key value functions are provided by the `github.com/spinframework/spin-go-sdk/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/kv) For example:

```go
import "github.com/fermyon/spin/sdk/go/v2/kv"
import "github.com/spinframework/spin-go-sdk/v2/kv"

func example() error {
store, err := kv.OpenStore("default")
Expand Down
2 changes: 1 addition & 1 deletion content/v3/language-support-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This page contains information about language support for Spin features:

{{ startTab "TinyGo"}}

**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**
**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**

| Feature | SDK Supported? |
|-----|-----|
Expand Down
Loading