Replace ioutil.WriteFile with os.WriteFile since the former has been
deprecated since go1.16 and simply calls the latter.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
gci needed cmd/snap-seccomp/main.go import comment to made one long line
otherwise it keeps only the last line :(
cmd/snap/color_test.go need some manual cleanup of commented out imports
This adds initial support for having "snapctl" commands read
from "stdin". Note that in the future we want something more
advanced that keeps the connection open and forwards the real
stdin to the server. But this requires much more work.
This variable can also be used to specify the cookie to use for snapctl, and
sometimes other tests can leak this env var, so to be safe just unset it in the
start of our test to ensure that we always use SNAP_COOKIE for this test
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
* xdgopenproxy: add a Go implementation of the xdg-open proxy client
* xdgopenproxy: add tests
* xdgopenproxy: test that passed file descriptor is for expected file
* xdgopenproxy: fix copyright years
This makes handling the configuration of core/snapd internal to snapd by using a dedicated handler chosen from snapstate.Configure instead of setting up running the "configure" hook.
This makes the tool much easier to discover (and document). It requires
that the API accepts a missing context, however, which means the
commands need to verify its presence before using it.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>