cmd

package
v2.42.5-go-mod+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Version will be overwritten at build-time via mkversion.sh

Functions

func ClientAppInfoNotes

func ClientAppInfoNotes(app *client.AppInfo) string

func ClientAppInfosFromSnapAppInfos

func ClientAppInfosFromSnapAppInfos(apps []*snap.AppInfo) ([]client.AppInfo, error)

func ClientSnapFromSnapInfo

func ClientSnapFromSnapInfo(snapInfo *snap.Info) (*client.Snap, error)

func ExecInSnapdOrCoreSnap

func ExecInSnapdOrCoreSnap()

ExecInSnapdOrCoreSnap makes sure you're executing the binary that ships in the snapd/core snap.

func InternalToolPath

func InternalToolPath(tool string) (string, error)

TODO: move to cmd/cmdutil/

InternalToolPath returns the path of an internal snapd tool. The tool *must* be located inside the same tree as the current binary.

The return value is either the path of the tool in the current distribution or in the core/snapd snap (or the ubuntu-core snap) if the current binary is ran from that location.

func MockOsReadlink(f func(string) (string, error)) func()

MockOsReadlink is for use in tests

func MockVersion

func MockVersion(version string) (restore func())

Types

type BySnapApp

type BySnapApp []*snap.AppInfo

BySnapApp sorts apps by (snap name, app name)

func (BySnapApp) Len

func (a BySnapApp) Len() int

func (BySnapApp) Less

func (a BySnapApp) Less(i, j int) bool

func (BySnapApp) Swap

func (a BySnapApp) Swap(i, j int)

Directories

Path Synopsis
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation.
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation.
Package snaplock offers per-snap locking also used by snap-confine.
Package snaplock offers per-snap locking also used by snap-confine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL