Skip to content

Commit

Permalink
Add renovate.json
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and stv0g committed May 30, 2023
1 parent 0e20d5d commit 42ef87a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
15 changes: 15 additions & 0 deletions feasibility.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package babel

import "github.com/stv0g/go-babel/proto"

type FeasibilityDistance struct {
SeqNo proto.SequenceNumber
Metric uint
}

// Less checks if the the feasibility is better than the provided one
//
// https://datatracker.ietf.org/doc/html/rfc8966#section-3.5.1
func (d FeasibilityDistance) IsBetter(o FeasibilityDistance) bool {
return proto.SeqnoLess(o.SeqNo, d.SeqNo) || (d.SeqNo == o.SeqNo && d.Metric < o.Metric)
}
19 changes: 19 additions & 0 deletions internal/queue/queue_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
// SPDX-License-Identifier: Apache-2.0

package queue_test

import (
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

func TestQueue(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Queue suite")
}

var _ = Describe("Queue", func() {
})
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}
2 changes: 2 additions & 0 deletions renovate.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
SPDX-License-Identifier: Apache-2.0

0 comments on commit 42ef87a

Please sign in to comment.