Browse Source

fix package config name

AlteredCoder 5 years ago
parent
commit
019c8d3e18
2 changed files with 8 additions and 8 deletions
  1. 1 1
      cmd/crowdsec/main.go
  2. 7 7
      pkg/csconfig/config.go

+ 1 - 1
cmd/crowdsec/main.go

@@ -10,7 +10,7 @@ import (
 	"time"
 
 	"github.com/crowdsecurity/crowdsec/pkg/acquisition"
-	config "github.com/crowdsecurity/crowdsec/pkg/config/crowdsec"
+	config "github.com/crowdsecurity/crowdsec/pkg/csconfig"
 	"github.com/crowdsecurity/crowdsec/pkg/cwversion"
 	leaky "github.com/crowdsecurity/crowdsec/pkg/leakybucket"
 	"github.com/crowdsecurity/crowdsec/pkg/outputs"

+ 7 - 7
pkg/config/crowdsec/config.go → pkg/csconfig/config.go

@@ -1,4 +1,4 @@
-package config
+package csconfig
 
 import (
 	"flag"
@@ -15,8 +15,8 @@ import (
 	"gopkg.in/yaml.v2"
 )
 
-// Crowdwatch is the structure of the crowdsec configuration
-type Crowdwatch struct {
+// CrowdSec is the structure of the crowdsec configuration
+type CrowdSec struct {
 	WorkingFolder   string    `yaml:"working_dir,omitempty"`
 	DataFolder      string    `yaml:"data_dir,omitempty"`
 	ConfigFolder    string    `yaml:"config_dir,omitempty"`
@@ -40,9 +40,9 @@ type Crowdwatch struct {
 	OutputConfig    *outputs.OutputFactory `yaml:"plugin"`
 }
 
-// NewCrowdwatchConfig create a new crowdsec configuration with default configuration
-func NewCrowdwatchConfig() *Crowdwatch {
-	return &Crowdwatch{
+// NewCrowdSecConfig create a new crowdsec configuration with default configuration
+func NewCrowdSecConfig() *CrowdSec {
+	return &CrowdSec{
 		LogLevel:      log.InfoLevel,
 		Daemonize:     false,
 		Profiling:     false,
@@ -60,7 +60,7 @@ func NewCrowdwatchConfig() *Crowdwatch {
 }
 
 // GetOPT return flags parsed from command line
-func (c *Crowdwatch) GetOPT() error {
+func (c *CrowdSec) GetOPT() error {
 
 	AcquisitionFile := flag.String("acquis", "", "path to acquis.yaml")
 	configFile := flag.String("c", "", "configuration file")