RobertIndie commented on code in PR #2437:
URL: https://github.com/apache/streampipes/pull/2437#discussion_r1481575379


##########
.github/workflows/go-client.yml:
##########
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name : go-client
+on:
+  pull_request:
+jobs:
+  Go-unit-tests:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        go-version: [ '1.21.x' ]
+        os: [ubuntu-latest, macos-latest, windows-latest]
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v4
+        with:
+          go-version: ${{ matrix.go-version }}
+      - uses: acifani/setup-tinygo@v2
+        with:
+          tinygo-version: '0.30.0'
+
+      - name: build
+        working-directory: ./streampipes-client-go
+        run: go build -v ./...

Review Comment:
   We can remove this step. The `go test` already covers the build step.



##########
.github/workflows/go-client.yml:
##########
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name : go-client
+on:
+  pull_request:
+jobs:
+  Go-unit-tests:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        go-version: [ '1.21.x' ]
+        os: [ubuntu-latest, macos-latest, windows-latest]
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v4
+        with:
+          go-version: ${{ matrix.go-version }}
+      - uses: acifani/setup-tinygo@v2
+        with:
+          tinygo-version: '0.30.0'

Review Comment:
   We don't need tinygo here.



##########
streampipes-client-go/go.mod:
##########
@@ -0,0 +1,20 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+module streampipes-client-go
+
+go 1.21

Review Comment:
   I think you need to run `go mod tidy` to get the correct content of the 
`go.mod`. And please also add the `go.sum` file to the git.



##########
streampipes-client-go/streampipes/StreamPipesClient.go:
##########
@@ -0,0 +1,59 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package streampipes
+
+import (
+       "errors"
+       "streampipes-client-go/streampipes/api"
+       "streampipes-client-go/streampipes/config"
+)
+
+/*
+ This is the central point of contact with StreamPipes and provides all the 
functionalities to interact with it.
+ The client provides so-called "API", each of which refers to the endpoint of 
the StreamPipes API.
+ e.g. `DataLakeMeasureApi` provides the actual methods to interact with 
StreamPipes API.
+*/
+
+type StreamPipesClient struct {
+       Config config.StreamPipesClientConnectionConfig
+}
+
+func NewStreamPipesClient(config config.StreamPipesClientConnectionConfig) 
(*StreamPipesClient, error) {
+
+       //NewStreamPipesClient returns an instance of * StreamPipesClient

Review Comment:
   ```suggestion
        //NewStreamPipesClient returns an instance of *StreamPipesClient
   ```



##########
streampipes-client-go/streampipes/StreamPipesClient.go:
##########


Review Comment:
   The file name format should be like `streampipes_client.go`.



##########
.github/workflows/go-client.yml:
##########
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name : go-client
+on:
+  pull_request:
+jobs:
+  Go-unit-tests:

Review Comment:
   ```suggestion
     go-unit-tests:
   ```



-- 
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]

Reply via email to