Skip to content

Commit 2f54e3f

Browse files
committed
some minor workspace changes
1 parent 9a9213f commit 2f54e3f

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
# vendor/
2424

2525
# Go workspace file
26-
go.work
26+
# go.work
27+
# go.work.sum
2728

2829
### Go Patch ###
2930
/vendor/

error.go

+3
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ func (o OopsError) MarshalJSON() ([]byte, error) {
372372
return json.Marshal(o.ToMap())
373373
}
374374

375+
// Format implements fmt.Formatter.
376+
// If the format is "%+v", then the details of the error are included.
377+
// Otherwise, using "%v", just the summary is included.
375378
func (o OopsError) Format(s fmt.State, verb rune) {
376379
if verb == 'v' && s.Flag('+') {
377380
fmt.Fprint(s, o.formatVerbose())

examples/log/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/samber/oops/examples/slog
1+
module github.com/samber/oops/examples/log
22

33
go 1.20
44

go.work

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
go 1.20
2+
3+
use (
4+
.
5+
6+
// logger formatters
7+
./loggers/logrus
8+
9+
// examples
10+
./examples/log
11+
./examples/slog
12+
./examples/logrus
13+
./examples/sources
14+
)

0 commit comments

Comments
 (0)