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: cache.go
    path of file: ./repos/juju/worker/uniter/runner/context
    
    the code of the file until where you have to start completion: // Copyright 2012-2014 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package context

import (
	"sort"

	"github.com/juju/errors"

	"github.c
    
func (cache *RelationCache) ApplicationSettings(appName string) (params.Settings, error) {
	// TODO(jam): 2019-10-10 We should probably validate that 'appName' is a valid
	//  application name and not a unit name. ReadSettings used to validate that
	//  it was a valid unit name, but now it can be a unitName or appName
	settings, found := cache.applications[appName]
	if !found {
		var err error
		settings, err = cache.readSettings(appName)
		if err != nil {
			return nil, errors.Trace(err)
		}
		cache.applications[appName] = settings
	}
	return settings, nil
}