-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.go
33 lines (23 loc) · 759 Bytes
/
app.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"github.com/nettoclaudio/dontpad-cli/user_interface"
"github.com/nettoclaudio/dontpad-cli/util"
)
func main() {
var setup user_interface.SetUp
var err error
setup, err = user_interface.ProcessCommands()
util.ShowMessageAndExitOnError(err)
if setup.ListSubfolders {
err = user_interface.ListSubfolders(setup.RemoteFolder)
util.ShowMessageAndExitOnError(err)
return
}
if user_interface.HasPipedInput() {
inputData := user_interface.GetPipedInputData()
user_interface.WriteFolder(setup.RemoteFolder, inputData);
} else {
err = user_interface.ShowContentFolder(setup.RemoteFolder)
util.ShowMessageAndExitOnError(err)
}
}