diff --git a/cmd/root.go b/cmd/root.go index 0a56349..291cbe9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -7,7 +7,7 @@ import ( "fmt" "os" - "codeberg.org/danjones000/strip-beats/config" + "codeberg.org/danjones000/strip-beats/files" "github.com/spf13/cobra" ) @@ -15,18 +15,10 @@ import ( var rootCmd = &cobra.Command{ Use: "strip-beats", Short: "A brief description of your application", - /* - Long: `A longer description that spans multiple lines and likely contains - examples and usage of using your application. For example: - - Cobra is a CLI library for Go that empowers applications. - This application is a tool to generate the needed files - to quickly create a Cobra application.`, - */ // Uncomment the following line if your bare application // has an action associated with it: Run: func(cmd *cobra.Command, args []string) { - fmt.Println(config.GetConfig()) + fmt.Println(files.GetCandidates()) }, } diff --git a/files/source.go b/files/source.go new file mode 100644 index 0000000..22f5881 --- /dev/null +++ b/files/source.go @@ -0,0 +1,13 @@ +package files + +import ( + "codeberg.org/danjones000/strip-beats/config" + "path/filepath" +) + +func GetCandidates() []string { + source := config.GetConfig().Source + ret, _ := filepath.Glob(filepath.Join(source, "*/*")) + + return ret +}