diff --git a/single_file_tests/slice.go b/single_file_tests/slice.go new file mode 100644 index 0000000..0f243dd --- /dev/null +++ b/single_file_tests/slice.go @@ -0,0 +1,18 @@ +package main + +import ( + "encoding/json" + "fmt" +) + +func main() { + s := make([]string, 0) + s = append(s, "Hello", "World") + + j, err := json.Marshal(s) + if err != nil { + fmt.Println("ERROR: ", err) + return + } + fmt.Println(string(j)) +} \ No newline at end of file