Skip to content

Commit e91714b

Browse files
authored
Update README.md
1 parent 5911caf commit e91714b

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,20 @@ val, err := cast.FromString("1", cast.Bool)
3434
// `val` value: true
3535
```
3636

37+
```go
38+
array, err := cast.FromString("a,b,c", "[]string")
39+
// `array` type: []string
40+
// `array` values: "a", "b", "c"
41+
```
42+
43+
```go
44+
array, err := cast.FromString("3.14,9.8", "[]float32")
45+
// `array` type: []float32
46+
// `array` values: 3.14, 9.8
47+
```
48+
3749
### Supported Types
38-
Currently, the GoLobby Cast supports the following types:
50+
Currently, the GoLobby Cast supports the following types and related array types:
3951
* Int (Int8 .. Int64)
4052
* Uint (Uint8 .. Uint64)
4153
* Float32 and Float64

0 commit comments

Comments
 (0)