本文整理匯總了Golang中github.com/appc/acpush/Godeps/_workspace/src/github.com/appc/spec/schema/types.ACName類的典型用法代碼示例。如果您正苦於以下問題:Golang ACName類的具體用法?Golang ACName怎麽用?Golang ACName使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ACName類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Get
// Get retrieves an app by the specified name from the AppList; if there is
// no such app, nil is returned. The returned *RuntimeApp MUST be considered
// read-only.
func (al AppList) Get(name types.ACName) *RuntimeApp {
for _, a := range al {
if name.Equals(a.Name) {
aa := a
return &aa
}
}
return nil
}
示例2: RelAppPath
// RelAppPath returns the path of an app relative to the stage1 chroot.
func RelAppPath(appName types.ACName) string {
return filepath.Join(stage2Dir, appName.String())
}
示例3: AppPath
// AppPath returns the path to an app's rootfs.
func AppPath(root string, appName types.ACName) string {
return filepath.Join(AppsPath(root), appName.String())
}