Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

go.x2ox.com/bencode

Package Overview
Dependencies
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.x2ox.com/bencode

Go Modules
Version
v1.0.1
Version published
Created
Source

Bencode

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

FAQs

Package last updated on 27 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts