增加IP动作

This commit is contained in:
刘祥超
2021-02-06 17:34:33 +08:00
parent 5d58321167
commit 3f469e9284
22 changed files with 1406 additions and 11 deletions

View File

@@ -0,0 +1,25 @@
package iplibrary
import (
"encoding/json"
"github.com/iwind/TeaGo/maps"
)
type BaseAction struct {
}
func (this *BaseAction) Close() error {
return nil
}
func (this *BaseAction) convertParams(params maps.Map, ptr interface{}) error {
data, err := json.Marshal(params)
if err != nil {
return err
}
err = json.Unmarshal(data, ptr)
if err != nil {
return err
}
return nil
}