MM-31064: Simplify indentation (#16565)
* MM-31064: Simplify indentation Reduce indentation where possible. ```release-note NONE ``` Command ran to verify: golangci-lint run --disable-all --enable golint --max-issues-per-linter=10000 --max-same-issues=100000 ./... | grep "block ends with a return state" https://mattermost.atlassian.net/browse/MM-31064 * incorporate review comments * enable golint for outdent rule * fix remaining issues Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7419898449
Коммит
1a131b54af
@@ -87,12 +87,12 @@ func GetAndValidateLicenseFileFromDisk(location string) (*model.License, []byte)
|
||||
mlog.Info("License key has not been uploaded. Loading license key from disk at", mlog.String("filename", fileName))
|
||||
licenseBytes := GetLicenseFileFromDisk(fileName)
|
||||
|
||||
if success, licenseStr := ValidateLicense(licenseBytes); !success {
|
||||
success, licenseStr := ValidateLicense(licenseBytes)
|
||||
if !success {
|
||||
mlog.Error("Found license key at %v but it appears to be invalid.", mlog.String("filename", fileName))
|
||||
return nil, nil
|
||||
} else {
|
||||
return model.LicenseFromJson(strings.NewReader(licenseStr)), licenseBytes
|
||||
}
|
||||
return model.LicenseFromJson(strings.NewReader(licenseStr)), licenseBytes
|
||||
}
|
||||
|
||||
func GetLicenseFileFromDisk(fileName string) []byte {
|
||||
@@ -116,9 +116,8 @@ func GetLicenseFileLocation(fileLocation string) string {
|
||||
if fileLocation == "" {
|
||||
configDir, _ := fileutils.FindDir("config")
|
||||
return filepath.Join(configDir, "mattermost.mattermost-license")
|
||||
} else {
|
||||
return fileLocation
|
||||
}
|
||||
return fileLocation
|
||||
}
|
||||
|
||||
func GetClientLicense(l *model.License) map[string]string {
|
||||
|
||||
Ссылка в новой задаче
Block a user