fix bug and upgrade dependency package edit
This commit is contained in:
parent
8aeec60181
commit
2ac3d82542
@ -264,23 +264,20 @@ func AdditionScript(h *Handle) {
|
||||
if len(s) < 1 {
|
||||
return
|
||||
}
|
||||
fn := func(f, name string) {
|
||||
fn := func(f, name, position string) {
|
||||
if f == "" {
|
||||
return
|
||||
}
|
||||
ss, err := os.ReadFile(f)
|
||||
if err != nil {
|
||||
logs.Error(err, str.Join("解析", name, "失败"), f)
|
||||
} else {
|
||||
h.PushComponents(constraints.AllScene, constraints.HeadScript, NewComponent(name, string(ss), false, 0, nil))
|
||||
return
|
||||
}
|
||||
h.PushComponents(constraints.AllScene, position, NewComponent(name, string(ss), false, 0, nil))
|
||||
}
|
||||
switch len(s) {
|
||||
case 1:
|
||||
fn(s[0], "externHead")
|
||||
case 2:
|
||||
fn(s[0], "externHead")
|
||||
fn(s[1], "externFooter")
|
||||
fn(s[0], "externHead", constraints.HeadScript)
|
||||
if len(s) > 1 {
|
||||
fn(s[1], "externFooter", constraints.FooterScript)
|
||||
}
|
||||
}
|
||||
|
||||
|
43
go.mod
43
go.mod
@ -1,41 +1,40 @@
|
||||
module github.com/fthvgb1/wp-go
|
||||
|
||||
go 1.21.0
|
||||
go 1.23
|
||||
|
||||
toolchain go1.23.0
|
||||
toolchain go1.23.4
|
||||
|
||||
require (
|
||||
github.com/dlclark/regexp2 v1.11.4
|
||||
github.com/elliotchance/phpserialize v1.4.0
|
||||
github.com/gin-contrib/gzip v1.0.1
|
||||
github.com/gin-contrib/pprof v1.5.0
|
||||
github.com/gin-contrib/sessions v1.0.1
|
||||
github.com/gin-contrib/gzip v1.2.2
|
||||
github.com/gin-contrib/pprof v1.5.2
|
||||
github.com/gin-contrib/sessions v1.0.2
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/go-playground/locales v0.14.1
|
||||
github.com/go-playground/universal-translator v0.18.1
|
||||
github.com/go-playground/validator/v10 v10.22.0
|
||||
github.com/go-playground/validator/v10 v10.24.0
|
||||
github.com/go-sql-driver/mysql v1.8.1
|
||||
github.com/goccy/go-json v0.10.3
|
||||
github.com/goccy/go-json v0.10.5
|
||||
github.com/jmoiron/sqlx v1.4.0
|
||||
golang.org/x/crypto v0.26.0
|
||||
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
|
||||
golang.org/x/crypto v0.32.0
|
||||
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/bytedance/sonic v1.12.2 // indirect
|
||||
github.com/bytedance/sonic/loader v0.2.0 // indirect
|
||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/bytedance/sonic v1.12.8 // indirect
|
||||
github.com/bytedance/sonic/loader v0.2.3 // indirect
|
||||
github.com/cloudwego/base64x v0.1.5 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
||||
github.com/gin-contrib/sse v1.0.0 // indirect
|
||||
github.com/gorilla/context v1.1.2 // indirect
|
||||
github.com/gorilla/securecookie v1.1.2 // indirect
|
||||
github.com/gorilla/sessions v1.3.0 // indirect
|
||||
github.com/gorilla/sessions v1.4.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
@ -43,11 +42,11 @@ require (
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
golang.org/x/arch v0.9.0 // indirect
|
||||
golang.org/x/net v0.28.0 // indirect
|
||||
golang.org/x/sys v0.24.0 // indirect
|
||||
golang.org/x/text v0.17.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
golang.org/x/arch v0.13.0 // indirect
|
||||
golang.org/x/net v0.34.0 // indirect
|
||||
golang.org/x/sys v0.29.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
google.golang.org/protobuf v1.36.4 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user