Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantKop committed Aug 25, 2023
1 parent 09e91d8 commit 3171a46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/baton-demisto/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ func validateConfig(ctx context.Context, cfg *config) error {
func cmdFlags(cmd *cobra.Command) {
cmd.PersistentFlags().String("token", "", "Access token used to connect to the Cortex XSOAR API. ($BATON_TOKEN)")
cmd.PersistentFlags().Bool("unsafe", false, "Allow insecure TLS connections to Cortex XSOAR instance. ($BATON_UNSAFE)")
cmd.PersistentFlags().String("api_url", "", "The API URL of the Cortex XSOAR instance. ($BATON_API_URL)")
cmd.PersistentFlags().String("api-url", "", "The API URL of the Cortex XSOAR instance. ($BATON_API_URL)")
}
4 changes: 2 additions & 2 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (de *Demisto) Validate(ctx context.Context) (annotations.Annotations, error
return nil, nil
}

func New(ctx context.Context, token, api_url string, unsafe bool) (*Demisto, error) {
func New(ctx context.Context, token, apiUrl string, unsafe bool) (*Demisto, error) {
options := []uhttp.Option{
uhttp.WithLogger(true, ctxzap.Extract(ctx)),
}
Expand All @@ -111,6 +111,6 @@ func New(ctx context.Context, token, api_url string, unsafe bool) (*Demisto, err
}

return &Demisto{
client: demisto.NewClient(httpClient, token, api_url),
client: demisto.NewClient(httpClient, token, apiUrl),
}, nil
}
4 changes: 2 additions & 2 deletions pkg/demisto/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ type Client struct {
type UsersResponse = []User
type RolesResponse = []Role

func NewClient(httpClient *http.Client, token, api_url string) *Client {
func NewClient(httpClient *http.Client, token, apiUrl string) *Client {
return &Client{
httpClient: httpClient,
Token: token,
ApiUrl: api_url,
ApiUrl: apiUrl,
}
}

Expand Down

0 comments on commit 3171a46

Please sign in to comment.