diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/nstypes/maps.go | 4 | ||||
-rw-r--r-- | pkg/nstypes/playlists.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pkg/nstypes/maps.go b/pkg/nstypes/maps.go index 6544263..d841f85 100644 --- a/pkg/nstypes/maps.go +++ b/pkg/nstypes/maps.go @@ -1,5 +1,7 @@ package nstypes +import "strconv" + type Map string const ( @@ -89,7 +91,7 @@ func Maps() []Map { // GoString gets the map in Go syntax. func (m Map) GoString() string { - return "Map(" + string(m) + ")" + return "Map(" + strconv.Quote(string(m)) + ")" } // SourceString gets the raw map name. diff --git a/pkg/nstypes/playlists.go b/pkg/nstypes/playlists.go index 69bacd1..5d8c90d 100644 --- a/pkg/nstypes/playlists.go +++ b/pkg/nstypes/playlists.go @@ -1,5 +1,7 @@ package nstypes +import "strconv" + type Playlist string const ( @@ -96,7 +98,7 @@ func Playlists() []Playlist { // GoString gets the map in Go syntax. func (p Playlist) GoString() string { - return "Playlist(" + string(p) + ")" + return "Playlist(" + strconv.Quote(string(p)) + ")" } // SourceString gets the raw playlist name. |