add user clear
This commit is contained in:
parent
634261a27c
commit
0cd890fbb0
|
@ -19,3 +19,12 @@ func (ui *Userinfo) Get(k string) string {
|
||||||
}
|
}
|
||||||
return ui.variables[k]
|
return ui.variables[k]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ui *Userinfo) Reset(id, name string) {
|
||||||
|
ui.ID = id
|
||||||
|
ui.Name = name
|
||||||
|
// clear the variables
|
||||||
|
for k, _ := range ui.variables {
|
||||||
|
delete(ui.variables, k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue