Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jjti committed Dec 28, 2023
1 parent 5ac43ef commit 65d468a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
GO_VERSION: ^1.21
GOLANGCI_LINT_VERSION: v1.54.0
GOLANGCI_LINT_VERSION: v1.55.0

jobs:
go_install:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spanlint ./...

## Configuration

```bash
```txt
$ spanlint -h
Usage of spanlint:
-disable-end-check
Expand Down Expand Up @@ -96,15 +96,15 @@ Not calling `SetStatus` prevents the `status` attribute from being set to `error

```go
func _() error {
_, span := otel.Tracer("foo").Start(context.Background(), "bar") // span.SetStatus is not called on all paths
defer span.End()
_, span := otel.Tracer("foo").Start(context.Background(), "bar") // span.SetStatus is not called on all paths
defer span.End()

if err := subTask(); err != nil {
if err := subTask(); err != nil {
span.RecordError(err)
return errors.New(err) // return can be reached without calling span.SetStatus
}
return errors.New(err) // return can be reached without calling span.SetStatus
}

return nil
return nil
}
```

Expand All @@ -119,10 +119,10 @@ func _() error {
_, span := otel.Tracer("foo").Start(context.Background(), "bar") // span.RecordError is not called on all paths
defer span.End()

if err := subTask(); err != nil {
if err := subTask(); err != nil {
span.SetStatus(codes.Error, err.Error())
return errors.New(err) // return can be reached without calling span.RecordError
}
}

return nil
}
Expand Down

0 comments on commit 65d468a

Please sign in to comment.