Skip to content

Commit

Permalink
fixes lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
luispresuelVenafi committed May 2, 2024
1 parent 6aa15db commit 6907c91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
7 changes: 0 additions & 7 deletions pkg/venafi/cloud/provisioning.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cloud

import (
"github.com/Venafi/vcert/v5/internal/datasource/cloudkeystores"
"github.com/Venafi/vcert/v5/pkg/endpoint"
)

Expand All @@ -11,12 +10,6 @@ type CloudKeystoreProvisioningResult struct {
Error error `json:"error"`
}

type ProvisioningMetadata struct {
AwsCertMetadata *cloudkeystores.CloudKeystore_AWSCertificateMetadata
AzureCertMetadata *cloudkeystores.CloudKeystore_AzureCertificateMetadata
GcpCertMetadata *cloudkeystores.CloudKeystore_GCPCertificateMetadata
}

type CloudProvisioningMetadata struct {
awsMetadata CloudAwsMetadata
azureMetadata CloudAzureMetadata
Expand Down
13 changes: 7 additions & 6 deletions pkg/websocket/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (wsc *WebsocketClient) ReadMessages() (*WorkflowResponse, error) {
} else {
prettified, err = json.MarshalIndent(ar, "", " ")
if err != nil {
log.Printf(err.Error())
log.Println(err.Error())
}
}

Expand All @@ -94,13 +94,12 @@ func (wsc *WebsocketClient) ReadMessages() (*WorkflowResponse, error) {
}

func (wsc *WebsocketClient) writeMessages() {
interrupt := make(chan os.Signal)
signal.Notify(interrupt, os.Interrupt, syscall.SIGINT, syscall.SIGKILL)
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)

ticker := time.NewTicker(wsc.wsOptions.PingPeriod)
defer func() {
signal.Stop(interrupt)

ticker.Stop()
}()

Expand Down Expand Up @@ -174,7 +173,9 @@ func Subscribe(apiKey string, baseUrl string, wsClientId string) (*websocket.Con
func ReadResponse(wsConn *websocket.Conn) (*WorkflowResponse, error) {

_, msg, err := wsConn.ReadMessage()
fmt.Println(string(msg))
if err != nil {
return nil, err
}

defer func() {
_ = wsConn.Close()
Expand All @@ -188,7 +189,7 @@ func ReadResponse(wsConn *websocket.Conn) (*WorkflowResponse, error) {
} else {
wfResponse, err = json.MarshalIndent(ar, "", " ")
if err != nil {
log.Printf(err.Error())
log.Println(err.Error())
}
}
log.Printf("<---- Workflow Response:\n%s", wfResponse)
Expand Down

0 comments on commit 6907c91

Please sign in to comment.