Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 6d6ba7b

Browse files
committed
#patch: rearrange struct fields for less memory usage
1 parent 6ddd3a6 commit 6d6ba7b

File tree

11 files changed

+53
-100
lines changed

11 files changed

+53
-100
lines changed

.github/workflows/comment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: comment
2+
on:
3+
pull_request:
4+
types: [opened]
5+
jobs:
6+
comment:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: circa10a/animal-action@main
10+
with:
11+
github_token: ${{ secrets.GITHUB_TOKEN }}

.golangci.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ COPY rules.yaml /
7777

7878
### Kubernetes
7979

80-
#### Deploy webhook application
80+
#### Deploy webhook application
8181

8282
> Kubernetes admission webhooks require https
8383

api/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ type swaggerInfo struct {
230230

231231
// SwaggerInfo holds exported Swagger Info so clients can modify it
232232
var SwaggerInfo = swaggerInfo{
233-
Version: "0.2.15",
233+
Version: "0.2.16",
234234
Host: "",
235235
BasePath: "",
236236
Schemes: []string{},

api/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"name": "MIT",
1212
"url": "https://github.com/circa10a/k8s-label-rules-webhook/blob/master/LICENSE"
1313
},
14-
"version": "0.2.15"
14+
"version": "0.2.16"
1515
},
1616
"paths": {
1717
"//": {

api/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ info:
7878
name: MIT
7979
url: https://github.com/circa10a/k8s-label-rules-webhook/blob/master/LICENSE
8080
title: k8s-label-rules-webhook
81-
version: 0.2.15
81+
version: 0.2.16
8282
paths:
8383
//:
8484
post:

go.mod

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ require (
99
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 // indirect
1010
github.com/fatih/structs v1.1.0 // indirect
1111
github.com/gavv/httpexpect v2.0.0+incompatible
12-
github.com/gin-gonic/gin v1.7.4
13-
github.com/go-openapi/jsonreference v0.19.6 // indirect
14-
github.com/go-openapi/swag v0.19.15 // indirect
12+
github.com/gin-gonic/gin v1.7.7
13+
github.com/go-openapi/spec v0.20.4 // indirect
1514
github.com/go-playground/validator/v10 v10.9.0 // indirect
1615
github.com/golang/protobuf v1.5.2 // indirect
1716
github.com/google/go-querystring v1.0.0 // indirect
@@ -25,15 +24,15 @@ require (
2524
github.com/moul/http2curl v1.0.0 // indirect
2625
github.com/onsi/ginkgo v1.12.0 // indirect
2726
github.com/onsi/gomega v1.9.0 // indirect
28-
github.com/prometheus/common v0.31.1 // indirect
27+
github.com/prometheus/common v0.32.1 // indirect
2928
github.com/prometheus/procfs v0.7.3 // indirect
3029
github.com/sergi/go-diff v1.0.0 // indirect
3130
github.com/sirupsen/logrus v1.8.1
3231
github.com/smartystreets/goconvey v1.6.4 // indirect
3332
github.com/stretchr/testify v1.7.0
3433
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2
35-
github.com/swaggo/gin-swagger v1.3.2
36-
github.com/swaggo/swag v1.7.3
34+
github.com/swaggo/gin-swagger v1.3.3
35+
github.com/swaggo/swag v1.7.4
3736
github.com/ugorji/go v1.2.6 // indirect
3837
github.com/valyala/fasthttp v1.7.0 // indirect
3938
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
@@ -42,10 +41,9 @@ require (
4241
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
4342
github.com/yudai/pp v2.0.1+incompatible // indirect
4443
github.com/zsais/go-gin-prometheus v0.1.0
45-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
46-
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect
47-
golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 // indirect
48-
golang.org/x/text v0.3.7 // indirect
44+
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 // indirect
45+
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect
46+
golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab // indirect
4947
golang.org/x/tools v0.1.7 // indirect
5048
google.golang.org/protobuf v1.27.1 // indirect
5149
gopkg.in/yaml.v2 v2.4.0

go.sum

Lines changed: 21 additions & 39 deletions
Large diffs are not rendered by default.

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func flags() {
6767
}
6868

6969
// @title k8s-label-rules-webhook
70-
// @version 0.2.15
70+
// @version 0.2.16
7171
// @description A kubernetes webhook to standardize labels on resources
7272

7373
// @contact.name GitHub

rules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
// Rules is a slice of rules that are loaded from a yaml array
1313
type rules struct {
14-
Rules []rule `yaml:"rules" json:"rules"`
1514
CompiledRegexs map[string]*regexp.Regexp
15+
Rules []rule `yaml:"rules" json:"rules"`
1616
}
1717

1818
// Rule is a struct that represents a rule within rules array

0 commit comments

Comments
 (0)