diff --git a/entry/http/user.go b/entry/http/user.go index 62e7984..ab97579 100644 --- a/entry/http/user.go +++ b/entry/http/user.go @@ -19,3 +19,12 @@ func (ui *Userinfo) Get(k string) string { } 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) + } +}