mirror of
https://github.com/fatedier/frp.git
synced 2026-10-15 05:25:57 +08:00
fix: use Go 1.26 new expressions for pointer initialization (#5559)
This commit is contained in:
@@ -17,8 +17,6 @@ package v1
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
||||
"github.com/fatedier/frp/pkg/util/jsonx"
|
||||
"github.com/fatedier/frp/pkg/util/util"
|
||||
)
|
||||
@@ -125,7 +123,7 @@ type HTTPS2HTTPPluginOptions struct {
|
||||
}
|
||||
|
||||
func (o *HTTPS2HTTPPluginOptions) Complete() {
|
||||
o.EnableHTTP2 = util.EmptyOr(o.EnableHTTP2, lo.ToPtr(true))
|
||||
o.EnableHTTP2 = util.EmptyOr(o.EnableHTTP2, new(true))
|
||||
}
|
||||
|
||||
func (o *HTTPS2HTTPPluginOptions) Clone() ClientPluginOptions {
|
||||
@@ -149,7 +147,7 @@ type HTTPS2HTTPSPluginOptions struct {
|
||||
}
|
||||
|
||||
func (o *HTTPS2HTTPSPluginOptions) Complete() {
|
||||
o.EnableHTTP2 = util.EmptyOr(o.EnableHTTP2, lo.ToPtr(true))
|
||||
o.EnableHTTP2 = util.EmptyOr(o.EnableHTTP2, new(true))
|
||||
}
|
||||
|
||||
func (o *HTTPS2HTTPSPluginOptions) Clone() ClientPluginOptions {
|
||||
|
||||
Reference in New Issue
Block a user