chore: use gofumpt for code formatting

This commit is contained in:
Quentin McGaw
2024-10-11 19:20:48 +00:00
parent 3daf15a612
commit 76a4bb5dc3
289 changed files with 784 additions and 548 deletions

View File

@@ -40,7 +40,8 @@ var (
)
func (pr *Parallel) Resolve(ctx context.Context, settings ParallelSettings) (
hostToIPs map[string][]netip.Addr, warnings []string, err error) {
hostToIPs map[string][]netip.Addr, warnings []string, err error,
) {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
@@ -96,7 +97,8 @@ func (pr *Parallel) Resolve(ctx context.Context, settings ParallelSettings) (
}
func (pr *Parallel) resolveAsync(ctx context.Context, host string,
settings RepeatSettings, results chan<- parallelResult, errors chan<- error) {
settings RepeatSettings, results chan<- parallelResult, errors chan<- error,
) {
IPs, err := pr.repeatResolver.Resolve(ctx, host, settings)
if err != nil {
errors <- err

View File

@@ -31,7 +31,8 @@ type RepeatSettings struct {
}
func (r *Repeat) Resolve(ctx context.Context, host string, settings RepeatSettings) (
ips []netip.Addr, err error) {
ips []netip.Addr, err error,
) {
timedCtx, cancel := context.WithTimeout(ctx, settings.MaxDuration)
defer cancel()
@@ -68,7 +69,8 @@ var (
func (r *Repeat) resolveOnce(ctx, timedCtx context.Context, host string,
settings RepeatSettings, uniqueIPs map[string]struct{}, noNewCounter, failCounter int) (
newNoNewCounter, newFailCounter int, err error) {
newNoNewCounter, newFailCounter int, err error,
) {
IPs, err := r.lookupIPs(timedCtx, host)
if err != nil {
failCounter++