-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmdCut.go
More file actions
41 lines (31 loc) · 874 Bytes
/
Copy pathcmdCut.go
File metadata and controls
41 lines (31 loc) · 874 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
39
40
41
////////////////////////////////////////////////////////////////////////////
// Program: picv
// Purpose: picture vault
// Authors: Tong Sun (c) 2017, All rights reserved
////////////////////////////////////////////////////////////////////////////
package main
import (
"fmt"
"github.com/mkideal/cli"
)
////////////////////////////////////////////////////////////////////////////
// Constant and data type/structure definitions
type OptsT struct {
Gap int
Pod int
Verbose int
}
var Opts OptsT
////////////////////////////////////////////////////////////////////////////
// cut
func cutCLI(ctx *cli.Context) error {
rootArgv := ctx.RootArgv().(*rootT)
argv := ctx.Argv().(*cutT)
Opts.Gap, Opts.Pod, Opts.Verbose = argv.Gap, argv.Pod, rootArgv.Verbose.Value()
ctx.JSON(Opts)
fmt.Println()
return picVault()
}
func picVault() error {
return nil
}