Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
1a80d088
Commit
1a80d088
authored
Sep 01, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix accessibility in a JSON-unmarshalled struct (spotted by go vet).
parent
b32701a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
dataplane.go
pkg/haproxy/dataplane.go
+5
-5
No files found.
pkg/haproxy/dataplane.go
View file @
1a80d088
...
...
@@ -496,8 +496,8 @@ func (client *DataplaneClient) Reloaded(id string) (bool, ReloadState, error) {
}
type
sitesBody
struct
{
v
ersion
int
`json:"_version,omitempty"`
s
ites
models
.
Sites
`json:"data"`
V
ersion
int
`json:"_version,omitempty"`
S
ites
models
.
Sites
`json:"data"`
}
// OffldrStatus returns true iff the offloader site has been loaded by
...
...
@@ -535,14 +535,14 @@ func (client *DataplaneClient) OffldrStatus() (
if
err
=
json
.
Unmarshal
(
body
,
&
sb
);
err
!=
nil
{
return
}
if
err
=
sb
.
s
ites
.
Validate
(
fmts
);
err
!=
nil
{
if
err
=
sb
.
S
ites
.
Validate
(
fmts
);
err
!=
nil
{
return
}
if
version
==
0
{
version
=
sb
.
v
ersion
version
=
sb
.
V
ersion
}
// XXX what if version from body & the header don't match?
for
_
,
site
:=
range
[]
*
models
.
Site
(
sb
.
s
ites
)
{
for
_
,
site
:=
range
[]
*
models
.
Site
(
sb
.
S
ites
)
{
if
site
.
Name
==
frontend
{
loaded
=
true
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment