fix: composite literal uses unkeyed fields

refactor/fs
Xhofe 2022-06-11 19:01:20 +08:00
parent 77b0c69112
commit 3135775250
1 changed files with 7 additions and 3 deletions

View File

@ -1,11 +1,12 @@
package operations
import (
"reflect"
"strings"
"github.com/alist-org/alist/v3/internal/driver"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"reflect"
"strings"
)
type New func() driver.Driver
@ -31,7 +32,10 @@ func registerDriverItems(config driver.Config, addition driver.Additional) {
tAddition := reflect.TypeOf(addition)
mainItems := getMainItems(config)
additionalItems := getAdditionalItems(tAddition)
driverItemsMap[config.Name] = driver.Items{mainItems, additionalItems}
driverItemsMap[config.Name] = driver.Items{
Main: mainItems,
Additional: additionalItems,
}
}
func getMainItems(config driver.Config) []driver.Item {