Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeBencode(input string) (interface{}, error)
- func EncodeBencodeDict(dict map[string]any) string
- func EncodeBencodeInteger(i int) string
- func EncodeBencodeList(list []any) string
- func EncodeBencodeString(s string) string
- func FindNextRune(start int, r rune, input []rune) (int, bool)
- func IsDictSymbol(cadidate interface{}) bool
- func IsListSymbol(cadidate interface{}) bool
- func ParseInt(input []rune) (int, error)
- func ShrinkDictionary(stackSlice []interface{}) (map[string]interface{}, error)
- func ShrinkStack(stack *DataStack) error
- type DataStack
Constants ¶
View Source
const ( INT_CONTROL_SYMBOL = 'i' STR_CONTROL_SYMBOL = ':' LIST_CONTROL_SYMBOL = 'l' DICT_CONTROL_SYMBOL = 'd' CLOSE_CONTROL_SYMBOL = 'e' )
Variables ¶
View Source
var DICT_MARKER = dict_markerType{}
dictinoary makrer for stack
View Source
var LIST_MARKER = list_markerType{}
list makrer for stack
Functions ¶
func DecodeBencode ¶
func EncodeBencodeDict ¶
func EncodeBencodeInteger ¶
func EncodeBencodeList ¶
func FindNextRune ¶
finds next [r] rune int input, useful for
func IsDictSymbol ¶
func IsDictSymbol(cadidate interface{}) bool
func IsListSymbol ¶
func IsListSymbol(cadidate interface{}) bool
func ShrinkDictionary ¶
Transforms sequence of elements in buff to map (bencode dictionary)
func ShrinkStack ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.
