Skip to content

Commit

Permalink
doc: fix go dev example code for FromSlicePtrOr
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjayaali committed Oct 20, 2024
1 parent 407b62d commit efa9cac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2760,10 +2760,10 @@ str1 := "hello"
str2 := "world"

ptr := lo.FromSlicePtrOr([]*string{&str1, nil, &str2}, "fallback value")
// []string{"hello", "world", "fallback value"}
// []string{"hello", "fallback value", "world"}
```

[[play](https://go.dev/play/p/lbunFvzlUDX)]
[[play](https://go.dev/play/p/CuXGVzo9G65)]

### ToAnySlice

Expand Down

0 comments on commit efa9cac

Please sign in to comment.