Skip to content

Commit a1966ed

Browse files
authored
Merge pull request #33 from fastly/dgryski/deprecate-fstctx
Deprecate fstctx
2 parents f3199ff + f2e23dc commit a1966ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

_examples/with-timeout/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ import (
88
"time"
99

1010
"github.com/fastly/compute-sdk-go/fsthttp"
11-
"github.com/fastly/compute-sdk-go/x/fstctx"
1211
)
1312

1413
func main() {
1514
fsthttp.ServeFunc(func(ctx context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request) {
1615
begin := time.Now()
1716

1817
// Create a context with a 1-second timeout.
19-
ctx, cancel := fstctx.WithTimeout(ctx, 1*time.Second)
18+
ctx, cancel := context.WithTimeout(ctx, 1*time.Second)
2019
defer cancel()
2120

2221
// Create the request, and set pass to true, to avoid caching.

x/fstctx/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
//
77
// All packages in `x`, including package fstctx, should be considered
88
// temporary, experimental, and unstable.
9+
//
10+
// Deprecated: Use the standard library `context` package instead.
911
package fstctx

0 commit comments

Comments
 (0)