-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathargs.go
More file actions
29 lines (27 loc) · 926 Bytes
/
args.go
File metadata and controls
29 lines (27 loc) · 926 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
package main
// Args struct
type Args struct {
FileName string
Sep string
SkipSymbol []string //ignore line with specified prefix
SkipNum int //Number of lines that should be skipped
ShowNum []int //columns that should be displayed
HideNum []int //columns that should be hidden
Header int //header display mode
NLine int //number of lines that should be displayed
Strict bool // check for missing data
AsyncLoad bool // enable async loading for progressive rendering
MemoryMB int // Memory limit in MB (0 = unlimited/default, >0 = custom limit)
}
func (args *Args) setDefault() {
args.Sep = ""
args.SkipSymbol = []string{}
args.SkipNum = 0
args.ShowNum = []int{}
args.HideNum = []int{}
args.Header = 0
args.NLine = 0
args.Strict = false
args.AsyncLoad = true // default to async loading
args.MemoryMB = 0 // Unlimited by default
}