Skip to content

Commit 6438626

Browse files
authored
[Cleanup] Update pre-v2 go package references (#17002)
1 parent 14d02ee commit 6438626

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

sdks/go/pkg/beam/core/runtime/harness/datamgr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ func (w *dataWriter) send(msg *fnpb.Elements) error {
492492
for err == nil {
493493
// Per GRPC stream documentation, if there's an EOF, we must call Recv
494494
// until a non-nil error is returned, to ensure resources are cleaned up.
495-
// https://godoc.org/google.golang.org/grpc#ClientConn.NewStream
495+
// https://pkg.go.dev/google.golang.org/grpc#ClientConn.NewStream
496496
_, err = w.ch.client.Recv()
497497
}
498498
}

sdks/go/pkg/beam/core/runtime/harness/datamgr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (f *fakeDataClient) Send(*fnpb.Elements) error {
9292
// We skip errors on the first call to test that errors can be returned
9393
// on the sentinel value send in dataWriter.Close
9494
// Otherwise, we return an io.EOF similar to semantics documented
95-
// in https://godoc.org/google.golang.org/grpc#ClientConn.NewStream
95+
// in https://pkg.go.dev/google.golang.org/grpc#ClientConn.NewStream
9696
if f.skipFirstError && f.err != nil {
9797
f.skipFirstError = false
9898
return nil

sdks/go/pkg/beam/core/runtime/harness/statemgr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func (c *StateChannel) write(ctx context.Context) {
412412
for err == nil {
413413
// Per GRPC stream documentation, if there's an EOF, we must call Recv
414414
// until a non-nil error is returned, to ensure resources are cleaned up.
415-
// https://godoc.org/google.golang.org/grpc#ClientConn.NewStream
415+
// https://pkg.go.dev/google.golang.org/grpc#ClientConn.NewStream
416416
_, err = c.client.Recv()
417417
}
418418
}

sdks/go/pkg/beam/util/gcsx/gcs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
)
3131

3232
// NewClient creates a new GCS client with default application credentials, and supplied
33-
// OAuth scope. The OAuth scopes are defined in https://godoc.org/cloud.google.com/go/storage#pkg-constants.
33+
// OAuth scope. The OAuth scopes are defined in https://pkg.go.dev/cloud.google.com/go/storage#pkg-constants.
3434
func NewClient(ctx context.Context, scope string) (*storage.Client, error) {
3535
return storage.NewClient(ctx, option.WithScopes(scope))
3636
}

website/www/site/content/en/documentation/programming-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6982,7 +6982,7 @@ When an SDK-specific wrapper isn't available, you will have to access the cross-
69826982
#### 13.2.3. Using cross-language transforms in a Go pipeline
69836983
69846984
If a Go-specific wrapper for a cross-language is available, use that. Otherwise, you have to use the
6985-
lower-level [CrossLanguage](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam#CrossLanguage)
6985+
lower-level [CrossLanguage](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam#CrossLanguage)
69866986
function to access the transform.
69876987
69886988
**Expansion Services**
@@ -7021,10 +7021,10 @@ When an SDK-specific wrapper isn't available, you will have to access the cross-
70217021
Refer to [Creating cross-language transforms](#create-x-lang-transforms) for details.
70227022
3. Use the `beam.CrossLanguage` function in your pipeline as appropriate. Reference the URN, payload,
70237023
expansion service address, and define inputs and outputs. You can use the
7024-
[beam.CrossLanguagePayload](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam#CrossLanguagePayload)
7024+
[beam.CrossLanguagePayload](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam#CrossLanguagePayload)
70257025
function as a helper for encoding a payload. You can use the
7026-
[beam.UnnamedInput](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam#UnnamedInput) and
7027-
[beam.UnnamedOutput](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam#UnnamedOutput)
7026+
[beam.UnnamedInput](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam#UnnamedInput) and
7027+
[beam.UnnamedOutput](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam#UnnamedOutput)
70287028
functions as shortcuts for single, unnamed inputs/outputs or define a map for named ones.
70297029
70307030
```go

website/www/site/content/en/documentation/resources/learning-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ complexity. Beam Katas are available for both Java and Python SDKs.
145145

146146
* **[Java API Reference](https://beam.apache.org/documentation/sdks/javadoc/)** - Official API Reference for the Java SDK.
147147
* **[Python API Reference](https://beam.apache.org/documentation/sdks/pydoc/)** - Official API Reference for the Python SDK.
148-
* **[Go API Reference](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam)** - Official API Reference for the Go SDK.
148+
* **[Go API Reference](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam)** - Official API Reference for the Go SDK.
149149

150150
## Feedback and Suggestions {#feedback-and-suggestions}
151151

website/www/site/content/en/documentation/sdks/go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It is based on the following [design](https://s.apache.org/beam-go-sdk-design-rf
2424

2525
Get started with the [Beam Go SDK quickstart](/get-started/quickstart-go) to set up your development environment and run an example pipeline. Then, read through the [Beam programming guide](/documentation/programming-guide) to learn the basic concepts that apply to all SDKs in Beam.
2626

27-
See the [godoc](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam) for more detailed information.
27+
See the [godoc](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam) for more detailed information.
2828

2929
## Status
3030

website/www/site/content/en/get-started/quickstart-go.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ required arguments described in the examples.
5151
For example, to run `wordcount`, run:
5252

5353
{{< runner direct >}}
54-
$ go install github.com/apache/beam/sdks/go/examples/wordcount
54+
$ go install github.com/apache/beam/sdks/v2/go/examples/wordcount
5555
$ wordcount --input <PATH_TO_INPUT_FILE> --output counts
5656
{{< /runner >}}
5757

5858
{{< runner dataflow >}}
59-
$ go install github.com/apache/beam/sdks/go/examples/wordcount
59+
$ go install github.com/apache/beam/sdks/v2/go/examples/wordcount
6060
# As part of the initial setup, for non linux users - install package unix before run
6161
$ go get -u golang.org/x/sys/unix
6262
$ wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \
@@ -75,7 +75,7 @@ $ wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \
7575
$ ./gradlew :runners:spark:3:job-server:runShadow -PsparkMasterUrl=spark://localhost:7077
7676

7777
# In a separate terminal, run:
78-
$ go install github.com/apache/beam/sdks/go/examples/wordcount
78+
$ go install github.com/apache/beam/sdks/v2/go/examples/wordcount
7979
$ wordcount --input <PATH_TO_INPUT_FILE> \
8080
--output counts \
8181
--runner spark \
@@ -85,7 +85,7 @@ $ wordcount --input <PATH_TO_INPUT_FILE> \
8585
## Next Steps
8686

8787
* Learn more about the [Beam SDK for Go](/documentation/sdks/go/)
88-
and look through the [godoc](https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam).
88+
and look through the [godoc](https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam).
8989
* Walk through these WordCount examples in the [WordCount Example Walkthrough](/get-started/wordcount-example).
9090
* Take a self-paced tour through our [Learning Resources](/documentation/resources/learning-resources).
9191
* Dive in to some of our favorite [Videos and Podcasts](/documentation/resources/videos-and-podcasts).

website/www/site/content/en/get-started/try-apache-beam.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ import (
121121
"fmt"
122122
"regexp"
123123

124-
"github.com/apache/beam/sdks/go/pkg/beam"
125-
"github.com/apache/beam/sdks/go/pkg/beam/io/textio"
126-
"github.com/apache/beam/sdks/go/pkg/beam/runners/direct"
127-
"github.com/apache/beam/sdks/go/pkg/beam/transforms/stats"
124+
"github.com/apache/beam/sdks/v2/go/pkg/beam"
125+
"github.com/apache/beam/sdks/v2/go/pkg/beam/io/textio"
126+
"github.com/apache/beam/sdks/v2/go/pkg/beam/runners/direct"
127+
"github.com/apache/beam/sdks/v2/go/pkg/beam/transforms/stats"
128128

129-
_ "github.com/apache/beam/sdks/go/pkg/beam/io/filesystem/local"
129+
_ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/local"
130130
)
131131

132132
var (

website/www/site/content/en/get-started/wordcount-example.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ python -m apache_beam.examples.wordcount_minimal --input YOUR_INPUT_FILE --outpu
6565
{{< /highlight >}}
6666

6767
{{< highlight go >}}
68-
$ go install github.com/apache/beam/sdks/go/examples/minimal_wordcount
68+
$ go install github.com/apache/beam/sdks/v2/go/examples/minimal_wordcount
6969
$ minimal_wordcount
7070
{{< /highlight >}}
7171

@@ -434,7 +434,7 @@ To view the full code in Python, see
434434
**To run this example in Go:**
435435

436436
{{< runner direct >}}
437-
$ go install github.com/apache/beam/sdks/go/examples/wordcount
437+
$ go install github.com/apache/beam/sdks/v2/go/examples/wordcount
438438
$ wordcount --input <PATH_TO_INPUT_FILE> --output counts
439439
{{< /runner >}}
440440

@@ -451,7 +451,7 @@ This runner is not yet available for the Go SDK.
451451
{{< /runner >}}
452452

453453
{{< runner dataflow >}}
454-
$ go install github.com/apache/beam/sdks/go/examples/wordcount
454+
$ go install github.com/apache/beam/sdks/v2/go/examples/wordcount
455455
# As part of the initial setup, for non linux users - install package unix before run
456456
$ go get -u golang.org/x/sys/unix
457457
$ wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \
@@ -760,7 +760,7 @@ To view the full code in Python, see
760760
**To run this example in Go:**
761761

762762
{{< runner direct >}}
763-
$ go install github.com/apache/beam/sdks/go/examples/debugging_wordcount
763+
$ go install github.com/apache/beam/sdks/v2/go/examples/debugging_wordcount
764764
$ debugging_wordcount --input <PATH_TO_INPUT_FILE> --output counts
765765
{{< /runner >}}
766766

@@ -777,7 +777,7 @@ This runner is not yet available for the Go SDK.
777777
{{< /runner >}}
778778

779779
{{< runner dataflow >}}
780-
$ go install github.com/apache/beam/sdks/go/examples/debugging_wordcount
780+
$ go install github.com/apache/beam/sdks/v2/go/examples/debugging_wordcount
781781
# As part of the initial setup, for non linux users - install package unix before run
782782
$ go get -u golang.org/x/sys/unix
783783
$ debugging_wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \
@@ -1088,7 +1088,7 @@ To view the full code in Python, see
10881088
**To run this example in Go:**
10891089

10901090
{{< runner direct >}}
1091-
$ go install github.com/apache/beam/sdks/go/examples/windowed_wordcount
1091+
$ go install github.com/apache/beam/sdks/v2/go/examples/windowed_wordcount
10921092
$ windowed_wordcount --input <PATH_TO_INPUT_FILE> --output counts
10931093
{{< /runner >}}
10941094

@@ -1105,7 +1105,7 @@ This runner is not yet available for the Go SDK.
11051105
{{< /runner >}}
11061106

11071107
{{< runner dataflow >}}
1108-
$ go install github.com/apache/beam/sdks/go/examples/windowed_wordcount
1108+
$ go install github.com/apache/beam/sdks/v2/go/examples/windowed_wordcount
11091109
# As part of the initial setup, for non linux users - install package unix before run
11101110
$ go get -u golang.org/x/sys/unix
11111111
$ windowed_wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \

0 commit comments

Comments
 (0)