diff --git a/.gitignore b/.gitignore index c9038a0..0b46bb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ shlex.test - -.pc diff --git a/README.md b/README.md index c4ffe72..e02a6d8 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,13 @@ } } ``` +output + + cp + -Rdp + file name + file name2 + dir name ## Documentation diff --git a/example_test.go b/example_test.go index 6533f5e..8408241 100644 --- a/example_test.go +++ b/example_test.go @@ -5,7 +5,6 @@ "log" "github.com/anmitsu/go-shlex" - flynn_shlex "github.com/flynn/go-shlex" ) func ExampleSplit() { @@ -55,46 +54,3 @@ // dir\ // name } - -func ExampleSplit_compareFlynn() { - cmd := `English and 日本語` - - // Split for github.com/flynn/go-shlex imported as flynn_shlex - words_flynn, err1 := flynn_shlex.Split(cmd) - - // Split for github.com/anmitsu/go-shlex - words_anmitsu, err2 := shlex.Split(cmd, true) - - fmt.Println("Source string:") - fmt.Println(cmd) - fmt.Println() - - fmt.Println("Result of github.com/flynn/go-shlex:") - for _, word := range words_flynn { - fmt.Println(word) - } - fmt.Println(err1.Error()) - - fmt.Println() - fmt.Println("Result of github.com/anmitsu/go-shlex:") - for _, word := range words_anmitsu { - fmt.Println(word) - } - if err2 != nil { - fmt.Println(err2.Error()) - } - - // Output: - // Source string: - // English and 日本語 - // - // Result of github.com/flynn/go-shlex: - // English - // and - // Unknown rune: 26085 - // - // Result of github.com/anmitsu/go-shlex: - // English - // and - // 日本語 -} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..67c3f0d --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/anmitsu/go-shlex + +go 1.13