preliminary write tokens to config with toml

This commit is contained in:
2023-09-16 13:53:53 +08:00
parent 856bb3e27b
commit 2f79a5d093
3 changed files with 74 additions and 85 deletions

View File

@@ -22,10 +22,9 @@ const (
)
var (
UserFormatReg = regexp.MustCompile("^\\w+$")
TokenFormatReg = regexp.MustCompile("^[\\w!@#$%^&*()]+$")
TrimAllSpaceReg = regexp.MustCompile("[\\n\\t\\r\\s]")
TrimBreakLineReg = regexp.MustCompile("[\\n\\t\\r]")
UserFormatReg = regexp.MustCompile("^\\w+$")
TokenFormatReg = regexp.MustCompile("^[\\w!@#$%^&*()]+$")
TrimAllSpaceReg = regexp.MustCompile("[\\n\\t\\r\\s]")
)
type Response struct {
@@ -116,9 +115,3 @@ type TokenEnable struct {
func (e *HTTPError) Error() string {
return e.Err.Error()
}
func (c *HandleController) TokensList() Tokens {
return Tokens{
c.Tokens,
}
}