Skip to content

X2OX/bencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JetBrains Open Source Licenses GoDoc Sourcegraph Go Report Card Release MIT license

Example

package main

import (
	"fmt"
	
	"go.x2ox.com/bencode"
)

func main() {
	s1 := "this is a example"
	b, err := bencode.Marshal(&s1)
	if err != nil {
		return
	}
	fmt.Println(string(b))
	
	var s2 string
	if err = bencode.Unmarshal(b, &s2); err != nil {
		return
	}
	fmt.Println(s2)
}

TODO

  • Coverage test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages