all: gofmt -w -r 'interface{} -> any' .

Updates #9687
This commit is contained in:
Bjørn Erik Pedersen
2022-03-17 22:03:27 +01:00
parent 423594e03a
commit b80853de90
342 changed files with 2118 additions and 2102 deletions

View File

@@ -71,14 +71,14 @@ type Options struct {
Inject []string
// User defined symbols.
Defines map[string]interface{}
Defines map[string]any
// Maps a component import to another.
Shims map[string]string
// User defined params. Will be marshaled to JSON and available as "@params", e.g.
// import * as params from '@params';
Params interface{}
Params any
// What to use instead of React.createElement.
JSXFactory string
@@ -106,7 +106,7 @@ type Options struct {
tsConfig string
}
func decodeOptions(m map[string]interface{}) (Options, error) {
func decodeOptions(m map[string]any) (Options, error) {
var opts Options
if err := mapstructure.WeakDecode(m, &opts); err != nil {
@@ -269,7 +269,7 @@ func createBuildPlugins(c *Client, opts Options) ([]api.Plugin, error) {
params := opts.Params
if params == nil {
// This way @params will always resolve to something.
params = make(map[string]interface{})
params = make(map[string]any)
}
b, err := json.Marshal(params)