Skip to content

Commit d44649e

Browse files
committed
Initial Commit
0 parents  commit d44649e

File tree

8 files changed

+96
-0
lines changed

8 files changed

+96
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright © 2022-, Douglas Sebastian Silva dos Santos
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the “Software”), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

cmd/root.go

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
3+
4+
*/
5+
package cmd
6+
7+
import (
8+
"log"
9+
10+
"github.com/spf13/cobra"
11+
12+
"edoex/embedfiles"
13+
)
14+
15+
var rootCmd = &cobra.Command{
16+
Use: "edoex",
17+
Short: "CLI tool to help creating expansions to EDOPro",
18+
Long: embedfiles.EdoexLogo,
19+
}
20+
21+
// todo: add verbose flag
22+
func init() {
23+
rootCmd.CompletionOptions.DisableDefaultCmd = true
24+
}
25+
26+
func Execute() {
27+
err := rootCmd.Execute()
28+
if err != nil {
29+
log.Fatalln(err)
30+
}
31+
}

embedfiles/embeds.go

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package embedfiles
2+
3+
import _ "embed"
4+
5+
var (
6+
//go:embed files/edoex_logo.txt
7+
EdoexLogo string
8+
)

embedfiles/files/edoex_logo.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_____ _ _____
2+
| ____| __| | ___ | ____| __ __
3+
| _| / _` | / _ \ | _| \ \/ /
4+
| |___ | (_| | | (_) | | |___ > <
5+
|_____| \__,_| \___/ |_____| /_/\_\
6+
v0.1

go.mod

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module edoex
2+
3+
go 1.18
4+
5+
require github.com/spf13/cobra v1.4.0
6+
7+
require (
8+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
9+
github.com/spf13/pflag v1.0.5 // indirect
10+
)

go.sum

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
2+
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
3+
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
4+
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
5+
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
6+
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
7+
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
8+
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
9+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
10+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

main.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
3+
4+
*/
5+
package main
6+
7+
import "edoex/cmd"
8+
9+
func main() {
10+
cmd.Execute()
11+
}

0 commit comments

Comments
 (0)