File tree Expand file tree Collapse file tree 6 files changed +65
-0
lines changed Expand file tree Collapse file tree 6 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ dist /
2
+ dist /flight.exe
Original file line number Diff line number Diff line change
1
+ ___ __ _ __ _
2
+ .' ..][ | (_) [ | / |_
3
+ _| |_ | | __ .--./)| |--. `| |-'
4
+ '-| |-' | | [ | / /'`\;| .-. | | |
5
+ | | | | | | \ \._//| | | | | |,
6
+ [___] [___][___].',__`[___]|__]\__/
7
+ ( ( __))
Original file line number Diff line number Diff line change
1
+ package flightpkg
2
+
3
+ import (
4
+ "bufio"
5
+ "fmt"
6
+ "os"
7
+ )
8
+
9
+ func Figlet () {
10
+ // Open the file.
11
+ f , _ := os .Open ("..\\ misc\\ flight.txt" )
12
+ // Create a new Scanner for the file.
13
+ scanner := bufio .NewScanner (f )
14
+ // Loop over all lines in the file and print them.
15
+ for scanner .Scan () {
16
+ line := scanner .Text ()
17
+ fmt .Println (line )
18
+ }
19
+ fmt .Println ()
20
+ }
21
+
22
+ func Help () {
23
+ fmt .Println (`flight <command> [arguments]
24
+
25
+ flight help
26
+ flight version
27
+ flight install <pkg>
28
+ flight uninstall <pkg>
29
+ flight update` )
30
+ }
Original file line number Diff line number Diff line change
1
+ module flightpkg
2
+
3
+ go 1.18
4
+
5
+ require github.com/mbndr/figlet4go v0.0.0-20190224160619-d6cef5b186ea // indirect
Original file line number Diff line number Diff line change
1
+ github.com/mbndr/figlet4go v0.0.0-20190224160619-d6cef5b186ea h1:mQncVDBpKkAecPcH2IMGpKUQYhwowlafQbfkz2QFqkc =
2
+ github.com/mbndr/figlet4go v0.0.0-20190224160619-d6cef5b186ea /go.mod h1:QzTGLGoOqLHUBK8/EZ0v4Fa4CdyXmdyRwCHcl0YbeO4 =
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ funcs "flightpkg/func"
5
+ "fmt"
6
+ "os"
7
+ )
8
+
9
+ func main () {
10
+ cli := os .Args [1 :]
11
+ funcs .Figlet ()
12
+ if len (cli ) == 0 {
13
+ fmt .Println ("flight <command> [arguments]" )
14
+ } else {
15
+ if cli [0 ] == "help" {
16
+ funcs .Help ()
17
+ }
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments