Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: liguozhong <[email protected]>

Signed-off-by: fuling <[email protected]>
  • Loading branch information
liguozhong committed Oct 19, 2023
1 parent 2921857 commit 1e992f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,8 @@ func (a alertmanagerLabels) url() *url.URL {
Path: a.labels.Get(pathLabel),
}
}
func NewTarget(labels labels.Labels, discoveredLabels labels.Labels) *Target {
return &Target{
labels: labels,
discoveredLabels: discoveredLabels,
}
func NewTarget(labels labels.Labels, discoveredLabels labels.Labels) Target {

Check failure on line 628 in notifier/notifier.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed with `-extra` (gofumpt)
return Target{labels, discoveredLabels}
}

type Target struct {
Expand Down
4 changes: 2 additions & 2 deletions web/api/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (t testAlertmanagerRetriever) TargetsAll() map[string][]notifier.Target {
allTargets := make(map[string][]notifier.Target)

allTargets["prod"] = []notifier.Target{
*notifier.NewTarget(
notifier.NewTarget(
labels.FromMap(map[string]string{
model.SchemeLabel: "http",
model.AddressLabel: "http://alertmanager.example.com:8080",
Expand All @@ -246,7 +246,7 @@ func (t testAlertmanagerRetriever) TargetsAll() map[string][]notifier.Target {
}

allTargets["dev"] = []notifier.Target{
*notifier.NewTarget(
notifier.NewTarget(
labels.EmptyLabels(),
labels.FromMap(map[string]string{
model.SchemeLabel: "http",
Expand Down

0 comments on commit 1e992f7

Please sign in to comment.