-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
38 lines (34 loc) · 723 Bytes
/
main.go
File metadata and controls
38 lines (34 loc) · 723 Bytes
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
34
35
36
37
38
package main
import (
"fmt"
"os"
"simple-file-server/command"
"simple-file-server/lib/config"
"simple-file-server/lib/log"
)
//func isRoot() bool {
// currentUser, err := user.Current()
// if err != nil {
// return false
// }
// return currentUser.Uid == "0"
//}
func init() {
//if !isRoot() {
// fmt.Println("ERROR: Use sudo run this command like \"sudo simple-file-server\"")
// os.Exit(-1)
//}
//res, _ := module.ProcessList()
//res, _ := module.ProcessConnectionList()
//res, _ := module.ProcessSSHSessions()
//console.GenerateSuccessData(res)
//os.Exit(0)
}
func main() {
log.Init()
config.Init()
if err := command.RootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}