This commit is contained in:
Andrew Nester 2024-12-18 13:10:59 +01:00
parent 72f70bf872
commit 2eda8e93f6
No known key found for this signature in database
GPG Key ID: 12BC628A44B7DA57
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/databricks/databricks-sdk-go/service/apps"
)
func ConvertAppToValue(app *apps.App, sourceCodePath string, appConfig map[string]interface{}) (dyn.Value, error) {
func ConvertAppToValue(app *apps.App, sourceCodePath string, appConfig map[string]any) (dyn.Value, error) {
ac, err := convert.FromTyped(appConfig, dyn.NilValue)
if err != nil {
return dyn.NilValue, err

View File

@ -126,7 +126,7 @@ func NewGenerateAppCommand() *cobra.Command {
return cmd
}
func getAppConfig(ctx context.Context, app *apps.App, w *databricks.WorkspaceClient) (map[string]interface{}, error) {
func getAppConfig(ctx context.Context, app *apps.App, w *databricks.WorkspaceClient) (map[string]any, error) {
sourceCodePath := app.DefaultSourceCodePath
f, err := filer.NewWorkspaceFilesClient(w, sourceCodePath)
@ -152,7 +152,7 @@ func getAppConfig(ctx context.Context, app *apps.App, w *databricks.WorkspaceCli
return nil, err
}
var appConfig map[string]interface{}
var appConfig map[string]any
err = yaml.Unmarshal(content, &appConfig)
if err != nil {
cmdio.LogString(ctx, fmt.Sprintf("Failed to parse app configuration:\n%s\nerr: %v", string(content), err))