You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: utils.go
    path of file: ./repos/juju/cmd/juju/application/utils
    
    the code of the file until where you have to start completion: // Copyright 2020 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package utils

import (
	"fmt"
	"io"
	"os"
	"strconv"

	charmresource "github.com/juju/charm/v12/resource"
	"github.com
    
func settingsFromYaml(ctx *cmd.Context, configOptions configFlag, appName string) (map[interface{}]interface{}, error) {
	var configYAML []byte
	files, err := configOptions.AbsoluteFileNames(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	switch len(files) {
	case 0:
		return make(map[interface{}]interface{}), nil
	case 1:
		configYAML, err = os.ReadFile(files[0])
		if err != nil {
			return nil, errors.Trace(err)
		}
	default:
		return nil, errors.Errorf("only a single config YAML file can be specified, got %d", len(files))
	}
	var allSettings map[string]interface{}
	if err := goyaml.Unmarshal(configYAML, &allSettings); err != nil {
		return nil, errors.Annotate(err, "cannot parse settings data")
	}
	settings, ok := allSettings[appName].(map[interface{}]interface{})
	if !ok {
		return nil, errors.Trace(err)
	}
	return settings, nil
}