mirror of
https://github.com/kemko/nomad.git
synced 2026-01-10 12:25:42 +03:00
fixup! chore: bump golangci-lint from v1.24 to v1.39
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
2
vendor/github.com/hashicorp/nomad/api/api.go
generated
vendored
2
vendor/github.com/hashicorp/nomad/api/api.go
generated
vendored
@@ -720,7 +720,7 @@ func (c *Client) doRequest(r *request) (time.Duration, *http.Response, error) {
|
||||
}
|
||||
start := time.Now()
|
||||
resp, err := c.httpClient.Do(req)
|
||||
diff := time.Now().Sub(start)
|
||||
diff := time.Since(start)
|
||||
|
||||
// If the response is compressed, we swap the body's reader.
|
||||
if resp != nil && resp.Header != nil {
|
||||
|
||||
4
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
4
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
@@ -120,7 +120,7 @@ func (v *CSIVolumes) CreateSnapshot(snap *CSISnapshot, w *WriteOptions) ([]*CSIS
|
||||
Snapshots: []*CSISnapshot{snap},
|
||||
}
|
||||
resp := &CSISnapshotCreateResponse{}
|
||||
meta, err := v.client.write(fmt.Sprintf("/v1/volumes/snapshot"), req, resp, w)
|
||||
meta, err := v.client.write("/v1/volumes/snapshot", req, resp, w)
|
||||
return resp.Snapshots, meta, err
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ func (v *CSIVolumes) DeleteSnapshot(snap *CSISnapshot, w *WriteOptions) error {
|
||||
req := &CSISnapshotDeleteRequest{
|
||||
Snapshots: []*CSISnapshot{snap},
|
||||
}
|
||||
_, err := v.client.delete(fmt.Sprintf("/v1/volumes/snapshot"), req, w)
|
||||
_, err := v.client.delete("/v1/volumes/snapshot", req, w)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
4
vendor/github.com/hashicorp/nomad/api/jobs.go
generated
vendored
4
vendor/github.com/hashicorp/nomad/api/jobs.go
generated
vendored
@@ -691,9 +691,7 @@ func (m *Multiregion) Copy() *Multiregion {
|
||||
copyRegion := new(MultiregionRegion)
|
||||
copyRegion.Name = region.Name
|
||||
copyRegion.Count = intToPtr(*region.Count)
|
||||
for _, dc := range region.Datacenters {
|
||||
copyRegion.Datacenters = append(copyRegion.Datacenters, dc)
|
||||
}
|
||||
copyRegion.Datacenters = append(copyRegion.Datacenters, region.Datacenters...)
|
||||
for k, v := range region.Meta {
|
||||
copyRegion.Meta[k] = v
|
||||
}
|
||||
|
||||
3
vendor/github.com/hashicorp/nomad/api/nodes.go
generated
vendored
3
vendor/github.com/hashicorp/nomad/api/nodes.go
generated
vendored
@@ -224,8 +224,7 @@ func (n *Nodes) monitorDrainNode(ctx context.Context, nodeID string,
|
||||
}
|
||||
|
||||
if node.DrainStrategy == nil {
|
||||
var msg *MonitorMessage
|
||||
msg = Messagef(MonitorMsgLevelInfo, "Drain complete for node %s", nodeID)
|
||||
msg := Messagef(MonitorMsgLevelInfo, "Drain complete for node %s", nodeID)
|
||||
select {
|
||||
case nodeCh <- msg:
|
||||
case <-ctx.Done():
|
||||
|
||||
4
vendor/github.com/hashicorp/nomad/api/scaling.go
generated
vendored
4
vendor/github.com/hashicorp/nomad/api/scaling.go
generated
vendored
@@ -24,9 +24,9 @@ func (s *Scaling) ListPolicies(q *QueryOptions) ([]*ScalingPolicyListStub, *Quer
|
||||
return resp, qm, nil
|
||||
}
|
||||
|
||||
func (s *Scaling) GetPolicy(ID string, q *QueryOptions) (*ScalingPolicy, *QueryMeta, error) {
|
||||
func (s *Scaling) GetPolicy(id string, q *QueryOptions) (*ScalingPolicy, *QueryMeta, error) {
|
||||
var policy ScalingPolicy
|
||||
qm, err := s.client.query("/v1/scaling/policy/"+ID, &policy, q)
|
||||
qm, err := s.client.query("/v1/scaling/policy/"+id, &policy, q)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
10
vendor/github.com/hashicorp/nomad/api/tasks.go
generated
vendored
10
vendor/github.com/hashicorp/nomad/api/tasks.go
generated
vendored
@@ -165,12 +165,12 @@ type Affinity struct {
|
||||
Weight *int8 `hcl:"weight,optional"` // Weight applied to nodes that match the affinity. Can be negative
|
||||
}
|
||||
|
||||
func NewAffinity(LTarget string, Operand string, RTarget string, Weight int8) *Affinity {
|
||||
func NewAffinity(lTarget string, operand string, rTarget string, weight int8) *Affinity {
|
||||
return &Affinity{
|
||||
LTarget: LTarget,
|
||||
RTarget: RTarget,
|
||||
Operand: Operand,
|
||||
Weight: int8ToPtr(Weight),
|
||||
LTarget: lTarget,
|
||||
RTarget: rTarget,
|
||||
Operand: operand,
|
||||
Weight: int8ToPtr(weight),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user