From 6b115b8f3edb6583e885c3f228fc839b7e04139c Mon Sep 17 00:00:00 2001 From: Tim Pepper Date: Fri, 26 Aug 2016 14:17:25 -0700 Subject: [PATCH] osprepare: be more explicit for go vet Go vet wants field keys. It is nice in that it's more obviously self-documenting code. To that end I also add a comment to ciao-scheduler/deps.go to inline note no known dep's. Signed-off-by: Tim Pepper --- ciao-controller/deps.go | 6 +++--- ciao-launcher/deps.go | 18 +++++++++--------- ciao-scheduler/deps.go | 7 ++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ciao-controller/deps.go b/ciao-controller/deps.go index 9cdf3be22..8641f9f73 100644 --- a/ciao-controller/deps.go +++ b/ciao-controller/deps.go @@ -21,12 +21,12 @@ import "github.com/01org/ciao/osprepare" var controllerDeps = osprepare.PackageRequirements{ /* sqlite3 is not strictly required, but useful for debug */ "clearlinux": { - {"/usr/bin/sqlite3", "cloud-control"}, + {BinaryName: "/usr/bin/sqlite3", PackageName: "cloud-control"}, }, "fedora": { - {"/usr/bin/sqlite3", "sqlite"}, + {BinaryName: "/usr/bin/sqlite3", PackageName: "sqlite"}, }, "ubuntu": { - {"/usr/bin/sqlite3", "sqlite3"}, + {BinaryName: "/usr/bin/sqlite3", PackageName: "sqlite3"}, }, } diff --git a/ciao-launcher/deps.go b/ciao-launcher/deps.go index d2bf9cdc5..aec32296c 100644 --- a/ciao-launcher/deps.go +++ b/ciao-launcher/deps.go @@ -25,21 +25,21 @@ import "github.com/01org/ciao/osprepare" // fuser for qemu instance pid var launcherClearLinuxCommonDeps = []osprepare.PackageRequirement{ - {"/usr/bin/qemu-system-x86_64", "cloud-control"}, - {"/usr/bin/xorriso", "cloud-control"}, - {"/usr/sbin/fuser", "cloud-control"}, + {BinaryName: "/usr/bin/qemu-system-x86_64", PackageName: "cloud-control"}, + {BinaryName: "/usr/bin/xorriso", PackageName: "cloud-control"}, + {BinaryName: "/usr/sbin/fuser", PackageName: "cloud-control"}, } var launcherFedoraCommonDeps = []osprepare.PackageRequirement{ - {"/usr/bin/qemu-system-x86_64", "qemu-system-x86"}, - {"/usr/bin/xorriso", "xorriso"}, - {"/usr/sbin/fuser", "psmisc"}, + {BinaryName: "/usr/bin/qemu-system-x86_64", PackageName: "qemu-system-x86"}, + {BinaryName: "/usr/bin/xorriso", PackageName: "xorriso"}, + {BinaryName: "/usr/sbin/fuser", PackageName: "psmisc"}, } var launcherUbuntuCommonDeps = []osprepare.PackageRequirement{ - {"/usr/bin/qemu-system-x86_64", "qemu-system-x86"}, - {"/usr/bin/xorriso", "xorriso"}, - {"/bin/fuser", "psmisc"}, + {BinaryName: "/usr/bin/qemu-system-x86_64", PackageName: "qemu-system-x86"}, + {BinaryName: "/usr/bin/xorriso", PackageName: "xorriso"}, + {BinaryName: "/bin/fuser", PackageName: "psmisc"}, } var launcherNetNodeDeps = map[string][]osprepare.PackageRequirement{ diff --git a/ciao-scheduler/deps.go b/ciao-scheduler/deps.go index 1542c7648..bd8f0c551 100644 --- a/ciao-scheduler/deps.go +++ b/ciao-scheduler/deps.go @@ -19,13 +19,14 @@ package main import "github.com/01org/ciao/osprepare" var schedDeps = osprepare.PackageRequirements{ + // no known dependencies "clearlinux": { - {"", ""}, + {BinaryName: "", PackageName: ""}, }, "fedora": { - {"", ""}, + {BinaryName: "", PackageName: ""}, }, "ubuntu": { - {"", ""}, + {BinaryName: "", PackageName: ""}, }, }