This repository was archived by the owner on Nov 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module github.com/scmn-dev/version-checker
33go 1.13
44
55require (
6- github.com/briandowns/spinner v1.16.0
76 github.com/abdfnx/shell v0.3.15
7+ github.com/briandowns/spinner v1.16.0
8+ github.com/scmn-dev/secman v0.0.0-20210809085739-bae204f9d756
89)
Original file line number Diff line number Diff line change 11package checker
22
33import (
4- // "fmt"
5- // "log"
4+ "fmt"
5+ "log"
66 "time"
7- // "runtime"
8- // "github.com/abdfnx/shell"
7+ "runtime"
8+ "github.com/abdfnx/shell"
99 "github.com/briandowns/spinner"
10- // commands "github.com/scmn-dev/secman/tools/constants"
10+ commands "github.com/scmn-dev/secman/tools/constants"
1111)
1212
1313func Checker () {
1414 s := spinner .New (spinner .CharSets [11 ], 100 * time .Millisecond )
1515 s .Suffix = " 🔍 Checking for updates..."
1616 s .Start ()
1717
18- // err, out, errout := shell.ShellOut("")
18+ err , out , errout := shell .ShellOut ("" )
1919
20- // if runtime.GOOS == "windows" {
21- // err, out, errout = shell.PWSLOut(commands.Check_w())
22- // } else {
23- // err, out, errout = shell.ShellOut(commands.Check_ml())
24- // }
20+ if runtime .GOOS == "windows" {
21+ err , out , errout = shell .PWSLOut (commands .Check_w ())
22+ } else {
23+ err , out , errout = shell .ShellOut (commands .Check_ml ())
24+ }
2525
26- // if err != nil {
27- // log.Printf("error: %v\n", err)
28- // fmt.Print(errout)
29- // }
26+ if err != nil {
27+ log .Printf ("error: %v\n " , err )
28+ fmt .Print (errout )
29+ }
3030
3131 s .Stop ()
32- // fmt.Print(out)
32+ fmt .Print (out )
3333}
You can’t perform that action at this time.
0 commit comments