Skip to content

Commit

Permalink
Clean up Go formatter suggestions (apache#16973)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmccluskey authored and nancyxu123 committed Mar 9, 2022
1 parent f8ca92a commit 1f2f053
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
40 changes: 20 additions & 20 deletions sdks/go/pkg/beam/core/runtime/exec/sideinput_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@ func TestNewSideInputAdapter(t *testing.T) {
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
adapter := NewSideInputAdapter(test.sid, test.sideInputID, test.c, nil)
adapterStruct, ok := adapter.(*sideInputAdapter)
if !ok {
t.Errorf("failed to convert interface to sideInputAdapter struct in test %v", test)
}
if got, want := adapterStruct.sid, test.sid; got != want {
t.Errorf("got SID %v, want %v", got, want)
}
if got, want := adapterStruct.sideInputID, test.sideInputID; got != want {
t.Errorf("got sideInputID %v, want %v", got, want)
}
if got, want := adapterStruct.c, test.c; got != want {
t.Errorf("got coder %v, want %v", got, want)
}
if got, want := reflect.TypeOf(adapterStruct.kc), reflect.TypeOf(test.kc); got != want {
t.Errorf("got ElementEncoder type %v, want %v", got, want)
}
if got, want := reflect.TypeOf(adapterStruct.ec), reflect.TypeOf(test.ec); got != want {
t.Errorf("got ElementDecoder type %v, want %v", got, want)
}
adapter := NewSideInputAdapter(test.sid, test.sideInputID, test.c, nil)
adapterStruct, ok := adapter.(*sideInputAdapter)
if !ok {
t.Errorf("failed to convert interface to sideInputAdapter struct in test %v", test)
}
if got, want := adapterStruct.sid, test.sid; got != want {
t.Errorf("got SID %v, want %v", got, want)
}
if got, want := adapterStruct.sideInputID, test.sideInputID; got != want {
t.Errorf("got sideInputID %v, want %v", got, want)
}
if got, want := adapterStruct.c, test.c; got != want {
t.Errorf("got coder %v, want %v", got, want)
}
if got, want := reflect.TypeOf(adapterStruct.kc), reflect.TypeOf(test.kc); got != want {
t.Errorf("got ElementEncoder type %v, want %v", got, want)
}
if got, want := reflect.TypeOf(adapterStruct.ec), reflect.TypeOf(test.ec); got != want {
t.Errorf("got ElementDecoder type %v, want %v", got, want)
}
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdks/go/pkg/beam/util/harnessopts/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package harnessopts defines user-facing entrypoints into Beam hooks
// Package harnessopts defines user-facing entrypoints into Beam hooks
// affecting the SDK harness. Call these functions at any time before
// submitting your pipeline to a runner, for that pipeline's workers to be affected.
package harnessopts
Expand Down
1 change: 1 addition & 0 deletions sdks/go/pkg/beam/util/syscallx/syscall_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !linux
// +build !linux

package syscallx
Expand Down
1 change: 1 addition & 0 deletions sdks/go/pkg/beam/util/syscallx/syscall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build linux
// +build linux

package syscallx
Expand Down

0 comments on commit 1f2f053

Please sign in to comment.