refactor io package

This commit is contained in:
Darien Raymond
2016-12-09 13:17:34 +01:00
parent 055023fdd5
commit 1948d0738f
36 changed files with 390 additions and 414 deletions
+1 -3
View File
@@ -3,8 +3,6 @@ package serial
import (
"fmt"
"strings"
"v2ray.com/core/common/buf"
)
func ToString(v interface{}) string {
@@ -36,7 +34,7 @@ func Concat(v ...interface{}) string {
return strings.Join(values, "")
}
func WriteString(s string) buf.Supplier {
func WriteString(s string) func([]byte) (int, error) {
return func(b []byte) (int, error) {
return copy(b, []byte(s)), nil
}