File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ hostify.json
Original file line number Diff line number Diff line change @@ -4,15 +4,28 @@ import (
44 "fmt"
55 "hostify/io"
66 "os"
7+ "runtime"
78)
89
910// InitialPackage create a initial hostify file
1011func InitialPackage () {
1112
1213 var path string
1314
15+ _os := runtime .GOOS
16+
17+ switch _os {
18+ case "windows" :
19+ path = "\\ hostify.json"
20+ case "darwin" :
21+ path = "/hostify.json"
22+ case "linux" :
23+ path = "/hostify.json"
24+ default :
25+ path = "/hostify.json"
26+ }
1427
15- _ , errExist := os .Stat (Cwd () + " \\ hostify.json" )
28+ _ , errExist := os .Stat (Cwd () + path )
1629
1730 // * verified if hostify file exist
1831 if ! os .IsNotExist (errExist ) {
@@ -37,7 +50,7 @@ func InitialPackage() {
3750
3851 if err == nil {
3952 file .Close ()
40- done := fmt .Sprintf ("Done: %v bites writes" , bitesWriter )
53+ done := fmt .Sprintf ("%v bites writes" , bitesWriter )
4154 io .SuccessMessage (done )
4255 os .Exit (0 )
4356 } else {
Original file line number Diff line number Diff line change 33 "description" : " Name here" ,
44 "version" : " 1.0.0" ,
55 "entry" : " ..." ,
6- "repository" : " https://github.com/{ owner }/ { repo name }" ,
6+ "repository" : " https://github.com/{ owner }/{ repo name }" ,
77 "files" : [" ..." , " ..." , " ..." ]
88}
You can’t perform that action at this time.
0 commit comments