Skip to content

Commit

Permalink
add markdown code block language
Browse files Browse the repository at this point in the history
  • Loading branch information
vladopajic committed Feb 9, 2024
1 parent 7d0be18 commit a148b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To enhance the code quality of projects that heavily rely on the actor model and

Projects that fully relay on actor model and `go-actor` library shouldn't use any synchronization primitives from `sync` package. Therefore repositories based on `go-actor` could add linter that will warn them if `sync` package is used, eg:

```
```yml
linters-settings:
forbidigo:
forbid:
Expand All @@ -23,7 +23,7 @@ While the general rule is to avoid `sync` package usage in actor-based code, the

Workers should always respond to `Context.Done()` channel and return `actor.WorkerEnd` status in order to end it's actor. As a rule of thumb it's advised to always list this case first since it should be included in every `select` statement.

```
```go
func (w *worker) DoWork(ctx actor.Context) actor.WorkerStatus {
select {
case <-ctx.Done():
Expand Down

0 comments on commit a148b0a

Please sign in to comment.