mirror of
https://github.com/luscis/openlan.git
synced 2025-10-08 10:00:12 +08:00
fix: support list guest and knock
This commit is contained in:
@@ -2,11 +2,12 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/luscis/openlan/pkg/libol"
|
||||
"os"
|
||||
"strconv"
|
||||
"text/template"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/luscis/openlan/pkg/libol"
|
||||
)
|
||||
|
||||
func OutJson(data interface{}) error {
|
||||
@@ -61,6 +62,9 @@ func OutTable(data interface{}, tmpl string) error {
|
||||
}
|
||||
return fmt.Sprintf(format, value)
|
||||
},
|
||||
"ut": func(value int64) string {
|
||||
return libol.UnixTime(value)
|
||||
},
|
||||
}
|
||||
if tmpl, err := template.New("main").Funcs(funcMap).Parse(tmpl); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user