Merge commits 129aac230aa..828edb8fd8b from https://github.com/chihaya/chihaya

This commit is contained in:
Širhoe Biazhkovič
2022-04-12 15:58:14 +03:00
parent c858576f76
commit c7edbb52f2
51 changed files with 562 additions and 1327 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ package middleware
import (
"errors"
"github.com/sot-tech/mochi/storage"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
"sync"
)
@@ -67,8 +67,8 @@ func New(name string, optionBytes []byte, storage storage.Storage) (Hook, error)
// Config is the generic configuration format used for all registered Hooks.
type Config struct {
Name string `yaml:"name"`
Options map[string]interface{} `yaml:"options"`
Name string `yaml:"name"`
Options map[string]any `yaml:"options"`
}
// HooksFromHookConfigs is a utility function for initializing Hooks in bulk.