Skip to content

Commit

Permalink
chore: create folders structure and files
Browse files Browse the repository at this point in the history
Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
  • Loading branch information
R3DRUN3 committed Oct 5, 2023
1 parent d65bba2 commit 0d5b79a
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "nostro",
Short: "Nostr OSINT",
Long: `NostrO enables you to do Open Source Intelligence on the Nostr protocol`,
Run: func(cmd *cobra.Command, args []string) {
// Your CLI's main logic goes here
fmt.Println("################### Welcome to NostrO 🔎 𓅦 ###################")
},
}

func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/r3drun3/nostro

go 1.21.1

require github.com/spf13/cobra v1.7.0

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
29 changes: 29 additions & 0 deletions internal/commands/nostrocmd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package commands

import (
"fmt"

"github.com/spf13/cobra"
)

var nostro = &cobra.Command{
Use: "nostro",
Short: "A custom command for NostrO",
Long: `This is a custom command for NostrO.`,
Run: func(cmd *cobra.Command, args []string) {
// Your custom command logic goes here
fmt.Println("Executing nostro...")
},
}

func init() {
// You can add flags and options specific to this command here
// Example:
// nostro.Flags().StringP("flagname", "f", "default", "help message")
// Cobra also supports persistent flags and local flags
// See https://github.com/spf13/cobra for more options
}

func Getnostro() *cobra.Command {
return nostro
}
16 changes: 16 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package config

// You can define your configuration struct and methods here
// Example:
// type Config struct {
// APIKey string
// APISecret string
// }

// LoadConfig loads the configuration from a file or environment variables.
// Implement this function based on your configuration needs.
// func LoadConfig() (*Config, error) {
// // Load configuration from a file or environment variables
// }

// You can add functions here to access configuration values as needed.
9 changes: 9 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"github.com/r3drun3/nostro/cmd"
)

func main() {
cmd.Execute()
}

0 comments on commit 0d5b79a

Please sign in to comment.