Skip to content

Commit

Permalink
Chore: update go modules (oscal-compass#31)
Browse files Browse the repository at this point in the history
* chore: update Go modules

Signed-off-by: Takumi Yanagawa <[email protected]>

* chore: upgrade go-git to v5

Signed-off-by: Takumi Yanagawa <[email protected]>

---------

Signed-off-by: Takumi Yanagawa <[email protected]>
  • Loading branch information
yana1205 authored Sep 12, 2024
1 parent 3c9e94e commit 2b0b410
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 1,875 deletions.
8 changes: 4 additions & 4 deletions go/controllers/utils/gitrepo/gitrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"os"
"time"

"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/transport/http"
)

type GitRepo struct {
Expand Down
4 changes: 2 additions & 2 deletions go/controllers/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"strconv"
"strings"

"github.com/go-git/go-git/v5"
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/go-logr/logr"
c2pv1alpha1 "github.com/oscal-compass/compliance-to-policy/go/api/v1alpha1"
edge "github.com/oscal-compass/compliance-to-policy/go/controllers/edge.kcp.io/v1alpha1"
Expand All @@ -36,8 +38,6 @@ import (
internalcompliance "github.com/oscal-compass/compliance-to-policy/go/pkg/types/internalcompliance"
typesoscal "github.com/oscal-compass/compliance-to-policy/go/pkg/types/oscal"
cd "github.com/oscal-compass/compliance-to-policy/go/pkg/types/oscal/componentdefinition"
"gopkg.in/src-d/go-git.v4"
githttp "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
"k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
351 changes: 186 additions & 165 deletions go/go.mod

Large diffs are not rendered by default.

2,247 changes: 549 additions & 1,698 deletions go/go.sum

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"

compliancetopolicycontrollerv1alpha1 "github.com/oscal-compass/compliance-to-policy/go/api/v1alpha1"
wgpolicyk8sv1alpha2 "github.com/oscal-compass/compliance-to-policy/go/controllers/wgpolicyk8s.io/v1alpha2"
Expand Down Expand Up @@ -84,9 +85,10 @@ func main() {
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
Scheme: scheme,
Metrics: server.Options{
BindAddress: metricsAddr,
},
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "bce5c8a1.github.com",
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/gitutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"os"
"strings"

"gopkg.in/src-d/go-git.v4"
githttp "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
"github.com/go-git/go-git/v5"
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
)

type GitUtils struct {
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/kyverno/result2oscal.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *ResultToOscal) retrievePolicyReportResults(name string) []*typepolr.Pol
for _, result := range polr.Results {
policy := result.Policy
if policy == name {
prrs = append(prrs, result)
prrs = append(prrs, &result)
}
}
}
Expand Down

0 comments on commit 2b0b410

Please sign in to comment.