From 0eb8ce1253dcf6796f862664439b03ac7addd43e Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 14 Aug 2014 14:27:17 -0400 Subject: [PATCH] move bencode to subdirectory making room for other packages --- README.md | 0 LICENSE => bencode/LICENSE | 0 bencode/README.md | 1 + bencode_test.go => bencode/bencode_test.go | 0 decode.go => bencode/decode.go | 0 parse.go => bencode/parse.go | 0 struct.go => bencode/struct.go | 2 ++ 7 files changed, 3 insertions(+) create mode 100644 README.md rename LICENSE => bencode/LICENSE (100%) create mode 100644 bencode/README.md rename bencode_test.go => bencode/bencode_test.go (100%) rename decode.go => bencode/decode.go (100%) rename parse.go => bencode/parse.go (100%) rename struct.go => bencode/struct.go (99%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/bencode/LICENSE similarity index 100% rename from LICENSE rename to bencode/LICENSE diff --git a/bencode/README.md b/bencode/README.md new file mode 100644 index 0000000..8ab1528 --- /dev/null +++ b/bencode/README.md @@ -0,0 +1 @@ +this is a copy from code.google.com/p/bencode-go diff --git a/bencode_test.go b/bencode/bencode_test.go similarity index 100% rename from bencode_test.go rename to bencode/bencode_test.go diff --git a/decode.go b/bencode/decode.go similarity index 100% rename from decode.go rename to bencode/decode.go diff --git a/parse.go b/bencode/parse.go similarity index 100% rename from parse.go rename to bencode/parse.go diff --git a/struct.go b/bencode/struct.go similarity index 99% rename from struct.go rename to bencode/struct.go index 115daa9..bdcb3e1 100644 --- a/struct.go +++ b/bencode/struct.go @@ -534,5 +534,7 @@ func isValueNil(val reflect.Value) bool { // an infinite recursion. // func Marshal(w io.Writer, val interface{}) error { + // TODO match other encoders, like encoding/json ... + // func Marshal(v interface{}) ([]byte, error) return writeValue(w, reflect.ValueOf(val)) }