Skip to content

Commit

Permalink
change app name gproject -> goproject
Browse files Browse the repository at this point in the history
  • Loading branch information
Dar-rius committed Nov 2, 2022
1 parent f7971e2 commit 4050202
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ func addProjectActually(project *Project) {
//the add Project function allows you to search the json file and save the data concerning the project (name and path)
func addProject(project *Project) {
//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
filEnv := os.Getenv("gproject")
filEnv := os.Getenv("goproject")
_, errr := os.Open(filEnv + "/path.json")
if errr != nil {
_, errs := os.Create(filEnv + "/path.json")
if errs != nil {
panic(errs)
os.Exit(0)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var goCmd = &cobra.Command{
// file and change directory by executing a shell command
func goPath(project *string) {
//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
filEnv := os.Getenv("gproject")
filEnv := os.Getenv("goproject")
viper.SetConfigName("path")
viper.SetConfigType("json")
viper.AddConfigPath(filEnv)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var lsCmd = &cobra.Command{
example: gproject ls`,
Run: func(cmd *cobra.Command, args []string) {
//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
filEnv := os.Getenv("gproject")
filEnv := os.Getenv("goproject")
file, err := os.ReadFile(filEnv + "/path.json")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module gproject
module github.com/Dar_rius/goproject

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package main

import "gproject/cmd"
import "github.com/Dar_rius/goproject/cmd"

func main() {
cmd.Execute()
Expand Down

0 comments on commit 4050202

Please sign in to comment.