make some correction
This commit is contained in:
+16
-1
@@ -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 == ':'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user