File tree 5 files changed +5
-6
lines changed
5 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,12 @@ func addProjectActually(project *Project) {
52
52
//the add Project function allows you to search the json file and save the data concerning the project (name and path)
53
53
func addProject (project * Project ) {
54
54
//the environment variable is stored in a variable in order to create and find the path.json file in the directory where the app is located
55
- filEnv := os .Getenv ("gproject " )
55
+ filEnv := os .Getenv ("goproject " )
56
56
_ , errr := os .Open (filEnv + "/path.json" )
57
57
if errr != nil {
58
58
_ , errs := os .Create (filEnv + "/path.json" )
59
59
if errs != nil {
60
60
panic (errs )
61
- os .Exit (0 )
62
61
}
63
62
}
64
63
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ var goCmd = &cobra.Command{
29
29
// file and change directory by executing a shell command
30
30
func goPath (project * string ) {
31
31
//the environment variable is stored in a variable in order to create and find the path.json file in the directory where the app is located
32
- filEnv := os .Getenv ("gproject " )
32
+ filEnv := os .Getenv ("goproject " )
33
33
viper .SetConfigName ("path" )
34
34
viper .SetConfigType ("json" )
35
35
viper .AddConfigPath (filEnv )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ var lsCmd = &cobra.Command{
16
16
example: gproject ls` ,
17
17
Run : func (cmd * cobra.Command , args []string ) {
18
18
//the environment variable is stored in a variable in order to create and find the path.json file in the directory where the app is located
19
- filEnv := os .Getenv ("gproject " )
19
+ filEnv := os .Getenv ("goproject " )
20
20
file , err := os .ReadFile (filEnv + "/path.json" )
21
21
if err != nil {
22
22
panic (err )
Original file line number Diff line number Diff line change 1
- module gproject
1
+ module github.com/Dar_rius/goproject
2
2
3
3
go 1.18
4
4
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
3
3
*/
4
4
package main
5
5
6
- import "gproject /cmd"
6
+ import "github.com/Dar_rius/goproject /cmd"
7
7
8
8
func main () {
9
9
cmd .Execute ()
You can’t perform that action at this time.
0 commit comments