Skip to content

Commit

Permalink
rebase with cobra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
travbale committed Dec 31, 2023
1 parent 0f09f99 commit c36b3fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

config "github.com/kyallanum/athena/v1.0.0/models/config"
library "github.com/kyallanum/athena/v1.0.0/models/library"
logs "github.com/kyallanum/athena/v1.0.0/models/logs"
config "github.com/kyallanum/athena/models/config"
library "github.com/kyallanum/athena/models/library"
logs "github.com/kyallanum/athena/models/logs"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -36,7 +36,7 @@ func Execute() error {
}

err := rootCmd.Execute()
errCheck(err)
errCheck(err)
fmt.Println("Athena v1.0.0 Starting")

fmt.Println("Getting Configuration File: ", configFile, "...")
Expand Down Expand Up @@ -78,7 +78,7 @@ func resolveLogFile(contents *logs.LogFile, configuration *config.Configuration)
return nil, fmt.Errorf("configuration does not have any rules")
}

ret_library := library.Library.New(library.Library{}, configuration.Name)
ret_library := library.New(configuration.Name)

fmt.Println("Resolving Log File")
for i := 0; i < len(configuration.Rules); i++ {
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ module github.com/kyallanum/athena

go 1.21

require github.com/davidmytton/url-verifier v1.0.0
require (
github.com/davidmytton/url-verifier v1.0.0
github.com/spf13/cobra v1.8.0
)

require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"

"github.com/kyallanum/athena/cmd"
"github.com/kyallanum/athena/models/config"
"github.com/kyallanum/athena/models/library"
"github.com/kyallanum/athena/models/logs"
config "github.com/kyallanum/athena/models/config"
library "github.com/kyallanum/athena/models/library"
logs "github.com/kyallanum/athena/models/logs"
)

func errCheck(err error) {
Expand Down
2 changes: 1 addition & 1 deletion models/config/source_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestNewFileConfig(t *testing.T) {
t.Errorf("Configuration source type not set properly")
}

if reflect.TypeOf(fileSource).String() != "*models.ConfigFileSource" {
if reflect.TypeOf(fileSource).String() != "*models.FileSource" {
t.Errorf("Configuration source not of the right type")
}
}
Expand Down

0 comments on commit c36b3fa

Please sign in to comment.