Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit 398f0ca

Browse files
committed
return to old syntax with newgithub.com/scmn-dev/secman` version
1 parent 662a5bf commit 398f0ca

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/scmn-dev/version-checker
33
go 1.13
44

55
require (
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
)

v_checker.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
package checker
22

33
import (
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

1313
func 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
}

0 commit comments

Comments
 (0)