Skip to content

Commit eb15c2e

Browse files
committed
migrate fwd references to kool
1 parent 2c74db3 commit eb15c2e

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

cmd/info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func init() {
1414

1515
var infoCmd = &cobra.Command{
1616
Use: "info",
17-
Short: "Prints out information about fwd setup (like environment variables)",
17+
Short: "Prints out information about kool setup (like environment variables)",
1818
Run: runInfo,
1919
Args: cobra.MaximumNArgs(1),
2020
}

cmd/stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type StopFlags struct {
1313

1414
var stopCmd = &cobra.Command{
1515
Use: "stop",
16-
Short: "Stop fwd environment containers",
16+
Short: "Stop kool environment containers",
1717
Run: runStop,
1818
}
1919

env.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"log"
66
"os"
7-
"path/filepath"
87
"strings"
98

109
"github.com/fireworkweb/godotenv"
@@ -13,16 +12,10 @@ import (
1312

1413
func initEnvironmentVariables() {
1514
var (
16-
files []string
1715
homeDir, workDir string
1816
err error
1917
)
2018

21-
files = []string{
22-
".env",
23-
".fwd", // TODO: BC only - remove soon
24-
}
25-
2619
homeDir, err = homedir.Dir()
2720
if err != nil {
2821
log.Fatal("Could not evaluate HOME directory - ", err)
@@ -42,21 +35,16 @@ func initEnvironmentVariables() {
4235
os.Setenv("PWD", workDir)
4336
}
4437

45-
files = append(files, fmt.Sprintf("%s%s.fwd", homeDir, string(filepath.Separator)))
46-
47-
for _, file := range files {
48-
if _, err = os.Stat(file); os.IsNotExist(err) {
49-
continue
50-
}
51-
38+
var file string = ".env"
39+
if _, err = os.Stat(file); !os.IsNotExist(err) {
5240
err = godotenv.Load(file)
5341
if err != nil {
5442
log.Fatal("Failure loading environment file ", file, " ERROR: '", err, "'")
5543
}
5644
}
5745

5846
// After loading all files, we should complemente the non-overwritten
59-
// default variables to their expected fwd distribution values
47+
// default variables to their expected distribution values
6048
allEnv := os.Environ()
6149
currentEnv := map[string]bool{}
6250
for _, env := range allEnv {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module fireworkweb/fwd
1+
module kool-dev/kool
22

33
go 1.14
44

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import (
44
"log"
55
"os"
66

7-
"fireworkweb/fwd/cmd"
7+
"kool-dev/kool/cmd"
88
)
99

1010
func main() {
11-
// log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds | log.Llongfile)
1211
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)
1312
initEnvironmentVariables()
1413

0 commit comments

Comments
 (0)