コード例 #1
0
ファイル: prepare.go プロジェクト: ywk253100/registry_p2p
func Download(client bittorrent.BitTorrent, path, torrentPath string, config map[string]string) (err error) {
	if err = client.Download(path, torrentPath, config); err != nil {
		return
	}
	return
}
コード例 #2
0
ファイル: prepare.go プロジェクト: ywk253100/registry_p2p
func CreateTorrent(bt bittorrent.BitTorrent, path, torrentPath string, trackers []string) (err error) {
	if bt.CreateTorrent(path, torrentPath, trackers); err != nil {
		return
	}
	return
}