make some correction

This commit is contained in:
2023-11-29 12:57:49 -05:00
parent 70c9e72753
commit 8000ff69c9
11 changed files with 948 additions and 65 deletions
+16 -1
View File
@@ -60,7 +60,12 @@ func GetEnvVarValueFromOsEnv(key string) string {
}
func GetGitTokenFromOsEnv() string {
token := os.Getenv("GIT_TOKEN")
token := os.Getenv("GITHUB_TOKEN")
return token
}
func GetGitTeaTokenFromOsEnv() string {
token := os.Getenv("GITEA_TOKEN")
return token
}
@@ -171,3 +176,13 @@ func GetProgramDir() string {
return exPath
}
// function check if OS = Windows
func IsWindows() bool {
return os.PathSeparator == '\\' && os.PathListSeparator == ';'
}
// function check if OS = Linux
func IsLinux() bool {
return os.PathSeparator == '/' && os.PathListSeparator == ':'
}