Skip to content

Commit 2edd142

Browse files
committed
update samples/README.md
1 parent 73eb244 commit 2edd142

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

samples/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
# Samples
22

33
Please play with the samples by editing them and running the main files:
4-
- `main.go` just a starter for different playgrounds
5-
- `main-play.go` general playground based on CopyFile and recursion
6-
- `main-db-sample.go` simulates DB transaction and money transfer
4+
- `main.go` just a starter for different playgrounds (includes `asserter` tester)
5+
- `main-play.go` general playground based on `CopyFile` and recursion
6+
- `main-db-sample.go` simulates DB transaction with money transfer
77
- `main-nil.go` samples and tests for logger and using `err2.Handle` for success
88

99
Run a default playground `play` mode:
1010
```go
11-
go run ./...
11+
go run .
1212
```
1313

14-
Or run the DB based version to maybe better understand how powerful the
15-
automatic error string building is:
14+
> [!TIP]
15+
> Set a proper alias to play with samples:
16+
> ```sh
17+
> alias sa='go run .'
18+
> ```
19+
20+
Run the DB based version to maybe better understand how powerful the automatic
21+
error string building is:
22+
1623
```go
17-
go run ./... -mode db
24+
sa -mode db
25+
# or
26+
go run . -mode db
1827
```
1928
2029
You can print usage:
2130
```go
22-
go run ./... -h
31+
sa -h
32+
# or
33+
go run . -h
2334
```

0 commit comments

Comments
 (0)