reverse nil statement instead of else (#2530)
This commit is contained in:
parent
0dd22e8b93
commit
28238cb01f
1 changed files with 2 additions and 3 deletions
|
@ -25,12 +25,11 @@ var CTIBackOffDuration time.Duration = 5 * time.Minute
|
|||
var ctiClient *cticlient.CrowdsecCTIClient
|
||||
|
||||
func InitCrowdsecCTI(Key *string, TTL *time.Duration, Size *int, LogLevel *log.Level) error {
|
||||
if Key != nil {
|
||||
CTIApiKey = *Key
|
||||
} else {
|
||||
if Key == nil {
|
||||
CTIApiEnabled = false
|
||||
return fmt.Errorf("CTI API key not set, CTI will not be available")
|
||||
}
|
||||
CTIApiKey = *Key
|
||||
if Size == nil {
|
||||
Size = new(int)
|
||||
*Size = 1000
|
||||
|
|
Loading…
Add table
Reference in a new issue