Chore: explore possibilities of using makefile (#17039)
* Chore: explore possibilities of using makefile This is an exploratory commit - I wanted to see how revive/gosec linters could be integrated with makefile and our build scripts. Looks better then I expected :) * Chore: make revive happy Revive execution was not supplied with path, if you restore there is couple errors that were popping up - so I fixed them * Chore: make revive happy
This commit is contained in:
@@ -9,7 +9,7 @@ var (
|
||||
ErrProviderDeniedRequest = errors.New("Login provider denied login request")
|
||||
ErrSignUpNotAllowed = errors.New("Signup is not allowed for this adapter")
|
||||
ErrTooManyLoginAttempts = errors.New("Too many consecutive incorrect login attempts for user. Login for user temporarily blocked")
|
||||
ErrPasswordEmpty = errors.New("No password provided.")
|
||||
ErrPasswordEmpty = errors.New("No password provided")
|
||||
ErrUsersQuotaReached = errors.New("Users quota reached")
|
||||
ErrGettingUserQuota = errors.New("Error getting user quota")
|
||||
)
|
||||
|
||||
@@ -25,9 +25,8 @@ func (dpm *DashboardProvisionerMock) Provision() error {
|
||||
dpm.Calls.Provision = append(dpm.Calls.Provision, nil)
|
||||
if dpm.ProvisionFunc != nil {
|
||||
return dpm.ProvisionFunc()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dpm *DashboardProvisionerMock) PollChanges(ctx context.Context) {
|
||||
@@ -41,7 +40,6 @@ func (dpm *DashboardProvisionerMock) GetProvisionerResolvedPath(name string) str
|
||||
dpm.Calls.PollChanges = append(dpm.Calls.GetProvisionerResolvedPath, name)
|
||||
if dpm.GetProvisionerResolvedPathFunc != nil {
|
||||
return dpm.GetProvisionerResolvedPathFunc(name)
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -25,34 +25,30 @@ func (mock *ProvisioningServiceMock) ProvisionDatasources() error {
|
||||
mock.Calls.ProvisionDatasources = append(mock.Calls.ProvisionDatasources, nil)
|
||||
if mock.ProvisionDatasourcesFunc != nil {
|
||||
return mock.ProvisionDatasourcesFunc()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mock *ProvisioningServiceMock) ProvisionNotifications() error {
|
||||
mock.Calls.ProvisionNotifications = append(mock.Calls.ProvisionNotifications, nil)
|
||||
if mock.ProvisionNotificationsFunc != nil {
|
||||
return mock.ProvisionNotificationsFunc()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mock *ProvisioningServiceMock) ProvisionDashboards() error {
|
||||
mock.Calls.ProvisionDashboards = append(mock.Calls.ProvisionDashboards, nil)
|
||||
if mock.ProvisionDashboardsFunc != nil {
|
||||
return mock.ProvisionDashboardsFunc()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mock *ProvisioningServiceMock) GetDashboardProvisionerResolvedPath(name string) string {
|
||||
mock.Calls.GetDashboardProvisionerResolvedPath = append(mock.Calls.GetDashboardProvisionerResolvedPath, name)
|
||||
if mock.GetDashboardProvisionerResolvedPathFunc != nil {
|
||||
return mock.GetDashboardProvisionerResolvedPathFunc(name)
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// A set of value types to use in provisioning. They add custom unmarshaling logic that puts the string values
|
||||
// Package values is a set of value types to use in provisioning. They add custom unmarshaling logic that puts the string values
|
||||
// through os.ExpandEnv.
|
||||
// Usage:
|
||||
// type Data struct {
|
||||
|
||||
Reference in New Issue
Block a user