MCPcopy Create free account
hub / github.com/Mister-leo/fssh / main

Function main

cmd/fssh/main.go:23–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21)
22
23func main() {
24 if len(os.Args) < 2 {
25 runShell()
26 return
27 }
28 cmd := os.Args[1]
29 switch cmd {
30 case "init":
31 cmdInit()
32 case "import":
33 cmdImport()
34 case "list":
35 cmdList()
36 case "export":
37 cmdExport()
38 case "status":
39 cmdStatus()
40 case "agent":
41 cmdAgent()
42 case "remove":
43 cmdRemove()
44 case "rekey":
45 cmdRekey()
46 case "shell":
47 runShell()
48 case "sshd-align":
49 cmdAlignSSHD()
50 case "config-gen":
51 cmdConfigGen()
52 default:
53 usage()
54 os.Exit(2)
55 }
56}
57
58func usage() {
59 fmt.Fprintf(os.Stderr, "usage: fssh <init|import|list|export|remove|rekey|status|agent|shell|sshd-align|config-gen>\n")

Callers

nothing calls this directly

Calls 12

runShellFunction · 0.85
cmdInitFunction · 0.85
cmdImportFunction · 0.85
cmdListFunction · 0.85
cmdExportFunction · 0.85
cmdStatusFunction · 0.85
cmdAgentFunction · 0.85
cmdRemoveFunction · 0.85
cmdRekeyFunction · 0.85
cmdAlignSSHDFunction · 0.85
cmdConfigGenFunction · 0.85
usageFunction · 0.85

Tested by

no test coverage detected