mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 04:51:10 +01:00
Skeleton complete
This commit is contained in:
parent
2c0ab69af7
commit
9aeaa70b60
9 changed files with 21 additions and 41 deletions
BIN
FLEcli
Executable file
BIN
FLEcli
Executable file
Binary file not shown.
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
|
||||
Copyright © 2020 Jean-Marc Meessen, ON4KJM <on4kjm@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package hello
|
||||
|
||||
func Hello() string {
|
||||
return "Hello, world."
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package hello
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package hello
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHello(t *testing.T) {
|
||||
want := "Hello, world."
|
||||
if got := Hello(); got != want {
|
||||
t.Errorf("Hello() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
14
cmd/load.go
14
cmd/load.go
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
|
||||
Copyright © 2020 Jean-Marc Meessen, ON4KJM <on4kjm@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -24,13 +24,13 @@ import (
|
|||
// loadCmd represents the load command
|
||||
var loadCmd = &cobra.Command{
|
||||
Use: "load",
|
||||
Short: "A brief description of your command",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
Short: "Loads and validates a FLE type logfile",
|
||||
// Long: `A longer description that spans multiple lines and likely contains examples
|
||||
// and usage of using your command. 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.`,
|
||||
// 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.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("load called")
|
||||
},
|
||||
|
|
17
cmd/root.go
17
cmd/root.go
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
|
||||
Copyright © 2020 Jean-Marc Meessen, ON4KJM <on4kjm@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -23,9 +23,10 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -35,13 +36,13 @@ var cfgFile string
|
|||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "FLEcli",
|
||||
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:
|
||||
Short: "A Command Line \"Fast Log Entry\" (FLE) processor",
|
||||
// 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.`,
|
||||
// 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) { },
|
||||
|
|
5
go.mod
5
go.mod
|
@ -8,10 +8,11 @@ require (
|
|||
github.com/pelletier/go-toml v1.8.0 // indirect
|
||||
github.com/spf13/afero v1.2.2 // indirect
|
||||
github.com/spf13/cast v1.3.1 // indirect
|
||||
github.com/spf13/cobra v1.0.0 // indirect
|
||||
github.com/spf13/cobra v1.0.0
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.7.0 // indirect
|
||||
github.com/spf13/viper v1.7.0
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect
|
||||
gopkg.in/ini.v1 v1.57.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
)
|
||||
|
|
2
main.go
2
main.go
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
|
||||
Copyright © 2020 Jean-Marc Meessen, ON4KJM <on4kjm@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
Loading…
Reference in a new issue