Fix lint errors

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
This commit is contained in:
Reagan Lopez
2019-12-23 11:32:17 -08:00
parent db64a95c18
commit 128ee414b9
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -451,7 +451,7 @@ func installFilesystem(chrootDir string, packagerCmd []string, downloadRetries i
pkgFull := fileSystemInfo.name + "-" + fileSystemInfo.version + "." + fileSystemInfo.arch
rpm := pkgFull + ".rpm"
var rpmFullPath string
for cacheDir, _ := range repos[fileSystemInfo.repo].cacheDirs {
for cacheDir := range repos[fileSystemInfo.repo].cacheDirs {
rpmFullPath = filepath.Join(cacheDir, rpm) // assuming the full path based on Clear Linux repo and naming conventions
_, err = os.Stat(rpmFullPath)
if err == nil {
@@ -663,7 +663,7 @@ func installBundleToFull(packagerCmd []string, baseDir string, bundle *bundle, d
}
var rpmFullPath string
pkgFull := pkgInfo.name + "-" + pkgInfo.version + "." + pkgInfo.arch
for cacheDir, _ := range repos[pkgInfo.repo].cacheDirs {
for cacheDir := range repos[pkgInfo.repo].cacheDirs {
rpmFullPath = filepath.Join(cacheDir, rpm) // assuming the full path based on Clear Linux repo and naming conventions
_, err = os.Stat(rpmFullPath)
if err == nil {
+3
View File
@@ -85,6 +85,9 @@ func TerminalWidth() (int, error) {
cmd := exec.Command("stty", "size")
cmd.Stdin = os.Stdin
out, err := cmd.Output()
if err != nil {
return 0, err
}
outStrs := strings.Fields(string(out))
if len(outStrs) != 2 {