Skip to content

Commit

Permalink
refactor: refactor code and improve formatting in several functions
Browse files Browse the repository at this point in the history
- Remove unnecessary code from `GetVersion` function
- Fix formatting in `GetDefaultConfig` function

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed May 27, 2024
1 parent 8d1431e commit 8fcf7c6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions common/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ func GetVersion(devops bool, typ, version string) string {
case string(ZenTaoMaxType):
defaultVersion = DefaultZentaoDevOPSMaxVersion
}
if version == defaultVersion || len(version) == 0 {
return defaultVersion
}
return version
return defaultVersion
}

func GetDefaultConfig() string {
Expand Down

0 comments on commit 8fcf7c6

Please sign in to comment.