lostluck commented on a change in pull request #16942:
URL: https://github.com/apache/beam/pull/16942#discussion_r814312118
##########
File path: sdks/go/pkg/beam/util/gcsx/gcs_test.go
##########
@@ -13,35 +13,62 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package gcsx_test
+package gcsx
import (
- "context"
- "time"
+ "testing"
- "cloud.google.com/go/storage"
- "github.com/apache/beam/sdks/v2/go/pkg/beam/util/gcsx"
+ "github.com/apache/beam/sdks/v2/go/pkg/beam/internal/errors"
)
-func Example() {
Review comment:
The main argument for leaving it in, in the sidecar gcsx_test package:
https://go.dev/blog/examples
https://pkg.go.dev/github.com/apache/beam/sdks/v2/go/pkg/beam/util/gcsx#example-package
Go will hoist examples like this into the package documentation, and they
are executed as a part of the tests, causing a failure when they fail.
I agree this one isn't exactly the best example of it though (since it would
end up actually trying to call the SDK).
But it still ensures that the example compiles, even if it's not validating
the use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]