diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 3a7f09a1..eb6b1082 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -39,8 +39,7 @@ jobs: # working-directory: somedir # Optional: golangci-lint command line arguments. - # ignore the lib.go file as it only contains cgo annotations - args: --skip-files internal/native/lib.go --timeout 2m + args: --timeout 2m # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true diff --git a/internal/native/message_server.go b/internal/native/message_server.go index 4f3481da..7f64ada1 100644 --- a/internal/native/message_server.go +++ b/internal/native/message_server.go @@ -184,7 +184,7 @@ func (m *Message) WithResponseJSONContents(body interface{}) *Message { func (m *Message) WithContents(part interactionPart, contentType string, body []byte) *Message { res := pactffi_with_body(m.handle, int32(part), contentType, string(body)) - log.Println("[DEBUG] response from pactffi_interaction_contents", (res == true)) + log.Println("[DEBUG] response from pactffi_interaction_contents", res) return m } @@ -443,7 +443,7 @@ func (m *MessageServer) CleanupMockServer(port int) bool { log.Println("[DEBUG] mock server cleaning up port:", port) res := pactffi_cleanup_mock_server(int32(port)) - return res == true + return res } // MockServerMismatchedRequests returns a JSON object containing any mismatches from @@ -482,7 +482,7 @@ func (m *MessageServer) MockServerMatched(port int) bool { // log.Println("MATCHED RES?") // log.Println(int(res)) - return res == true + return res } // WritePactFile writes the Pact to file. diff --git a/internal/native/mock_server.go b/internal/native/mock_server.go index 0e343dff..93552959 100644 --- a/internal/native/mock_server.go +++ b/internal/native/mock_server.go @@ -106,7 +106,7 @@ func Init(logLevel string) { // MockServer is the public interface for managing the HTTP mock server type MockServer struct { pact *Pact - messagePact *MessagePact + // messagePact *MessagePact interactions []*Interaction } @@ -263,9 +263,9 @@ func GetTLSConfig() *tls.Config { // pactffi_free_string(str) // } -func libRustFree(str string) { - pactffi_string_delete(str) -} +// func libRustFree(str string) { +// pactffi_string_delete(str) +// } // Start starts up the mock HTTP server on the given address:port and TLS config // https://docs.rs/pact_mock_server_ffi/0.0.7/pact_mock_server_ffi/fn.create_mock_server_for_pact.html @@ -565,9 +565,9 @@ func (i *Interaction) WithStatus(status int) *Interaction { return i } -type stringLike interface { - String() string -} +// type stringLike interface { +// String() string +// } func stringFromInterface(obj interface{}) string { switch t := obj.(type) {