This repository was archived by the owner on Sep 7, 2024. It is now read-only.
File tree 2 files changed +15
-9
lines changed
2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type Log struct {
30
30
31
31
type User struct {
32
32
Name string `yaml:"name"`
33
- PassWord string `yaml:"pass_word "`
33
+ Password string `yaml:"password "`
34
34
Cmds []string `yaml:"cmds"`
35
35
}
36
36
@@ -42,14 +42,19 @@ func (conf *Config) BasicCheck() error {
42
42
}
43
43
44
44
func DefaultConfig () * Config {
45
- config := & Config {}
46
- config .Log .Path = "ttrace.log"
47
- config .Name = "time_trace"
48
- config .Server .IP = "localhost"
49
- config .Server .Port = "7070"
45
+ config := & Config {
46
+ Server : Server {
47
+ IP : "localhost" ,
48
+ Port : "7070" ,
49
+ },
50
+ Log : Log {
51
+ Path : "ttrace.log" ,
52
+ },
53
+ Name : "time_trace" ,
54
+ }
50
55
rootUser := User {
51
56
Name : "root" ,
52
- PassWord : "super_secret_password" ,
57
+ Password : "super_secret_password" ,
53
58
Cmds : []string {"*" },
54
59
}
55
60
config .Users = append (config .Users , rootUser )
Original file line number Diff line number Diff line change 9
9
10
10
users :
11
11
- name : root
12
- pass_word : super_secret_password
12
+ password : super_secret_password
13
13
cmds :
14
14
- ' *'
15
+
15
16
# Also you can use this for multiple users and limited commands
16
17
# users:
17
18
# - name: root
18
- # pass_word : super_secret_password
19
+ # password : super_secret_password
19
20
# cmd:
20
21
# - * # all commands.
21
22
# - name: developer
You can’t perform that action at this time.
0 commit comments