From df3e2d81db0e5ba57052126bb52b553cc672ed4f Mon Sep 17 00:00:00 2001 From: Summer Date: Fri, 2 Jul 2021 13:51:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session.go | 13 +------------ whitedew.go | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/session.go b/session.go index fcdd668..aeb9364 100644 --- a/session.go +++ b/session.go @@ -5,21 +5,14 @@ import ( "time" ) -type ArgParser func(s *Session) - -func (a ArgParser) Parse(s *Session) { - a(s) -} - type Session struct { Manager *SessionManager Sender Sender StartTime time.Time Message Message - Env map[string]interface{} + Env map[string]interface{} IsFirstRun bool Action string - ArgParser ArgParser Agent *Agent } @@ -42,10 +35,6 @@ func (s Session) Get(arg string, prompt string) interface{} { return s.Env[arg] } -func (s *Session) RegisterArgParser(parser ArgParser) { - s.ArgParser = parser -} - type SessionManager struct { Pool map[int64]*Session } diff --git a/whitedew.go b/whitedew.go index 8955dfb..2607386 100644 --- a/whitedew.go +++ b/whitedew.go @@ -18,7 +18,6 @@ func (h HandlerFunc) Handle(s *Session) { h(s) } - type Server struct { engine *gin.Engine }