实现实时展示访问日志

This commit is contained in:
GoEdgeLab
2020-10-10 19:21:32 +08:00
parent a95d4cbbfa
commit 911e57b1f2
7 changed files with 348 additions and 15 deletions

View File

@@ -1,12 +1,14 @@
package configs
import (
"fmt"
"github.com/go-yaml/yaml"
"github.com/iwind/TeaGo/Tea"
"io/ioutil"
)
var sharedAPIConfig *APIConfig = nil
var PaddingId string
// API节点配置
type APIConfig struct {
@@ -43,6 +45,7 @@ func SharedAPIConfig() (*APIConfig, error) {
// 设置数字ID
func (this *APIConfig) SetNumberId(numberId int64) {
this.numberId = numberId
PaddingId = fmt.Sprintf("%08d", numberId)
}
// 获取数字ID