在bytes_test.go中,我看到:
a := Split([]byte(tt.s), []byte(tt.sep), tt.n)
其中tt.s和tt.sep是字符串。但是当我尝试去做
a := bytes.Split([]byte("test"), []byte("e"), 0)
我得到:
cannot convert "test" (type ideal string) to type []uint8 in conversion cannot convert "e" (type ideal string) to type []uint8 in conversion
慕少森
相关分类