Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sundowndev
GitHub Repository: sundowndev/phoneinfoga
Path: blob/master/cmd/root.go
988 views
1
package cmd
2
3
import (
4
"fmt"
5
"github.com/fatih/color"
6
"os"
7
8
"github.com/spf13/cobra"
9
)
10
11
var rootCmd = &cobra.Command{
12
Use: "phoneinfoga [COMMANDS] [OPTIONS]",
13
Short: "Advanced information gathering & OSINT tool for phone numbers",
14
Long: "PhoneInfoga is one of the most advanced tools to scan phone numbers using only free resources.",
15
Example: "phoneinfoga scan -n <number>",
16
}
17
18
// Execute is a function that executes the root command
19
func Execute() {
20
if err := rootCmd.Execute(); err != nil {
21
exitWithError(err)
22
}
23
}
24
25
func exitWithError(err error) {
26
fmt.Fprintf(color.Error, "%s\n", color.RedString(err.Error()))
27
os.Exit(1)
28
}
29
30