mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-31 15:36:37 +08:00
实现websocket基本功能
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
package shared
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
)
|
||||
|
||||
var regexpNamedVariable = regexp.MustCompile("\\${[\\w.-]+}")
|
||||
|
||||
// 头部信息定义
|
||||
type HTTPHeaderConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"` // ID
|
||||
@@ -26,7 +24,7 @@ func NewHeaderConfig() *HTTPHeaderConfig {
|
||||
|
||||
// 校验
|
||||
func (this *HTTPHeaderConfig) Init() error {
|
||||
this.hasVariables = regexpNamedVariable.MatchString(this.Value)
|
||||
this.hasVariables = configutils.HasVariables(this.Value)
|
||||
|
||||
if this.Status != nil {
|
||||
err := this.Status.Init()
|
||||
|
||||
Reference in New Issue
Block a user