mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-30 07:35:51 +08:00
chore: Bump up to Go 1.19, minimum 1.18 (#4925)
This commit is contained in:
@ -71,7 +71,7 @@ func (enc *Encode) Provision(ctx caddy.Context) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("loading encoder modules: %v", err)
|
||||
}
|
||||
for modName, modIface := range mods.(map[string]interface{}) {
|
||||
for modName, modIface := range mods.(map[string]any) {
|
||||
err = enc.addEncoding(modIface.(Encoding))
|
||||
if err != nil {
|
||||
return fmt.Errorf("adding encoding %s: %v", modName, err)
|
||||
@ -142,7 +142,7 @@ func (enc *Encode) addEncoding(e Encoding) error {
|
||||
enc.writerPools = make(map[string]*sync.Pool)
|
||||
}
|
||||
enc.writerPools[ae] = &sync.Pool{
|
||||
New: func() interface{} {
|
||||
New: func() any {
|
||||
return e.NewEncoder()
|
||||
},
|
||||
}
|
||||
@ -418,7 +418,7 @@ type Precompressed interface {
|
||||
}
|
||||
|
||||
var bufPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
New: func() any {
|
||||
return new(bytes.Buffer)
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user