Skip to content

Commit 063a9bb

Browse files
committed
Fix additional linter issues
1 parent 7b29210 commit 063a9bb

File tree

2 files changed

+6
-6
lines changed
  • webhosting-operator

2 files changed

+6
-6
lines changed

webhosting-operator/cmd/measure/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func prepareOutputDir() error {
237237
outputDir = "."
238238
}
239239

240-
if err := os.MkdirAll(outputDir, 0755); err != nil {
240+
if err := os.MkdirAll(outputDir, 0750); err != nil {
241241
return err
242242
}
243243

@@ -303,7 +303,7 @@ func (q Query) writeResult(data metricData) error {
303303
out = os.Stdout
304304
fmt.Println("# " + fileName)
305305
} else {
306-
file, err := os.OpenFile(filepath.Join(outputDir, fileName), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
306+
file, err := os.OpenFile(filepath.Join(outputDir, fileName), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
307307
if err != nil {
308308
return err
309309
}
@@ -418,7 +418,7 @@ type matrixData struct {
418418
}
419419

420420
func (m *matrixData) IsEmpty() bool {
421-
return m.Matrix.Len() == 0
421+
return m.Len() == 0
422422
}
423423

424424
func (m *matrixData) GetLabelNames() model.LabelNames {
@@ -477,7 +477,7 @@ type vectorData struct {
477477
}
478478

479479
func (v *vectorData) IsEmpty() bool {
480-
return v.Vector.Len() == 0
480+
return v.Len() == 0
481481
}
482482

483483
func (v *vectorData) GetLabelNames() model.LabelNames {

webhosting-operator/pkg/experiment/scenario/base/base.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ type Scenario struct {
4949

5050
Log logr.Logger
5151
Manager manager.Manager
52-
client.Client
53-
done chan struct{}
52+
Client client.Client
53+
done chan struct{}
5454

5555
RunID string
5656
Labels map[string]string

0 commit comments

Comments
 (0)