Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin/trace: fix struct allignment #4112

Merged
merged 2 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions plugin/erratic/erratic.go
Expand Up @@ -13,15 +13,13 @@ import (

// Erratic is a plugin that returns erratic responses to each client.
type Erratic struct {
drop uint64

q uint64 // counter of queries
drop uint64
delay uint64
duration time.Duration

truncate uint64
large bool // undocumented feature; return large responses for A request (>512B, to test compression).

q uint64 // counter of queries
duration time.Duration
large bool // undocumented feature; return large responses for A request (>512B, to test compression).
}

// ServeDNS implements the plugin.Handler interface.
Expand Down
3 changes: 2 additions & 1 deletion plugin/trace/trace.go
Expand Up @@ -29,6 +29,8 @@ const (
)

type trace struct {
count uint64 // as per Go spec, needs to be first element in a struct

Next plugin.Handler
Endpoint string
EndpointType string
Expand All @@ -37,7 +39,6 @@ type trace struct {
serviceName string
clientServer bool
every uint64
count uint64
Once sync.Once
}

Expand Down