Skip to content

Commit 3ad4637

Browse files
authored
Merge pull request #9 from runloopai/gautam-fmt
chore: Fix formatting
2 parents 4e32e4c + 270c1f2 commit 3ad4637

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

cmd/overlaybd-snapshotter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func requestIDInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
5353
requestID = mylog.GenerateRequestID()
5454
ctx = tracing.SetRequestID(ctx, requestID)
5555
}
56-
56+
5757
ctx = mylog.WithRequestID(ctx, requestID)
5858
ctx = log.WithLogger(ctx, log.G(ctx).WithField("req_id", requestID))
5959

pkg/convertor/convertor.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -558,31 +558,31 @@ func (c *overlaybdConvertor) convertLayers(ctx context.Context, srcDescs []ocisp
558558

559559
var remoteDesc ocispec.Descriptor
560560

561-
if c.remote {
562-
fmt.Printf("convertLayers: Looking for remote layer\n")
563-
span.AddEvent("remote_check_start", trace.WithAttributes(
564-
attribute.String("host", c.host),
565-
attribute.String("repo", c.repo),
566-
attribute.String("chainID", chainID),
567-
))
568-
569-
remoteDesc, err = c.findRemote(ctx, chainID)
570-
if err != nil {
571-
if !errdefs.IsNotFound(err) {
572-
fmt.Printf("convertLayers: ERROR finding remote: %v\n", err)
573-
addErrorEvent(span, err, "remote_check", desc)
574-
return nil, err
561+
if c.remote {
562+
fmt.Printf("convertLayers: Looking for remote layer\n")
563+
span.AddEvent("remote_check_start", trace.WithAttributes(
564+
attribute.String("host", c.host),
565+
attribute.String("repo", c.repo),
566+
attribute.String("chainID", chainID),
567+
))
568+
569+
remoteDesc, err = c.findRemote(ctx, chainID)
570+
if err != nil {
571+
if !errdefs.IsNotFound(err) {
572+
fmt.Printf("convertLayers: ERROR finding remote: %v\n", err)
573+
addErrorEvent(span, err, "remote_check", desc)
574+
return nil, err
575+
}
576+
fmt.Printf("convertLayers: Remote layer not found, will process locally\n")
577+
} else {
578+
fmt.Printf("convertLayers: Found remote layer\n")
575579
}
576-
fmt.Printf("convertLayers: Remote layer not found, will process locally\n")
577-
} else {
578-
fmt.Printf("convertLayers: Found remote layer\n")
579-
}
580580

581-
span.AddEvent("remote_check_complete", trace.WithAttributes(
582-
attribute.Bool("found", err == nil),
583-
attribute.String("chainID", chainID),
584-
))
585-
}
581+
span.AddEvent("remote_check_complete", trace.WithAttributes(
582+
attribute.Bool("found", err == nil),
583+
attribute.String("chainID", chainID),
584+
))
585+
}
586586

587587
if c.remote && err == nil {
588588
key := fmt.Sprintf(convSnapshotNameFormat, chainID)
@@ -678,7 +678,7 @@ func (c *overlaybdConvertor) applyOCIV1LayerInObd(
678678
afterApply func(root string) error, // do something after apply tar stream
679679
) (string, error) {
680680
startTime := time.Now()
681-
681+
682682
ctx, span := tracer.Start(ctx, "applyOCIV1LayerInObd",
683683
trace.WithAttributes(
684684
attribute.String("parent_id", parentID),

pkg/convertor/trace_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ func addErrorEvent(span trace.Span, err error, operation string, desc ocispec.De
130130
attribute.String("layer_digest", desc.Digest.String()),
131131
attribute.String("error_type", getErrorType(err)),
132132
))
133-
}
133+
}

pkg/convertor/trace_helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ func TestGetDiskUsage(t *testing.T) {
148148
if usage <= 0 {
149149
t.Errorf("Expected positive disk usage, got %d", usage)
150150
}
151-
}
151+
}

pkg/tracing/baggage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ func TestSimplifiedBaggage(t *testing.T) {
4242
if member.Value() != "test-12345" {
4343
t.Errorf("Expected baggage value 'test-12345', got '%s'", member.Value())
4444
}
45-
}
45+
}

pkg/tracing/propagation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func TestTraceIDPropagation(t *testing.T) {
115115
validSpans++
116116
}
117117
}
118-
118+
119119
if validSpans == 0 {
120120
t.Error("No valid spans found")
121121
}

pkg/utils/provenance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ func IsProvenanceDescriptor(desc v1.Descriptor) bool {
5959
}
6060

6161
return false
62-
}
62+
}

tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ package tools
55

66
import (
77
_ "gotest.tools/gotestsum"
8-
)
8+
)

0 commit comments

Comments
 (0)