Skip to content

Commit

Permalink
Merge pull request #1 from p0dalirius/fix-banner-printing
Browse files Browse the repository at this point in the history
[enhancement] Moved printing of Banner in Parse()
  • Loading branch information
p0dalirius authored Oct 22, 2024
2 parents 0439086 + edd09b5 commit 3389b38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parser/arguments_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ func (ap *ArgumentsParser) populateMaps() {
func (ap *ArgumentsParser) Parse() {
ap.populateMaps()

if len(ap.Banner) != 0 {
fmt.Printf("%s\n\n", ap.Banner)
}

// Store error messages of parsing arguments
errorMessages := []string{}

Expand Down Expand Up @@ -341,10 +345,6 @@ func (ap *ArgumentsParser) Get(argumentFlag string) (interface{}, error) {
// The function ensures that the usage information is displayed in a clear and organized manner, making it easy for users to understand
// the available command-line arguments and their descriptions.
func (ap *ArgumentsParser) Usage() {
if len(ap.Banner) != 0 {
fmt.Printf("%s\n\n", ap.Banner)
}

// Create usage string
usage := filepath.Base(os.Args[0])

Expand Down

0 comments on commit 3389b38

Please sign in to comment.