Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ArunMurugan78 committed Jan 7, 2022
1 parent 05dad96 commit f42aede
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,18 @@ func main() {
fmt.Println(decodedData) // map[list:[pickachu anakin NYC 78] name:rose]
}

```
```

## Invalid Data?
To be able to encode a given data into bencode, it's data type has to be one of the below.

| Type | Description|
| :-- | :--- |
| `int`| Can be any one of the `int` and `uint` variants.|
| `string` | UTF-8 encoded strings.|
| `[]interface{}`| The slice can hold any one of the valid data type.|
| `map[string]interface{}` | The key has to be a string and the value can be any one of the valid data type.


## License
The project is licensed under the [MIT](https://github.com/ArunMurugan78/bencode/blob/master/LICENSE) license.

0 comments on commit f42aede

Please sign in to comment.