aboutsummaryrefslogtreecommitdiff
path: root/pkg/nstypes
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-12 22:09:16 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-12 22:09:16 -0400
commit27d3a7a684a00d729db630d3901c6ecf8fed8550 (patch)
tree1384eec53d9ba6f20c3626a869097fe797912805 /pkg/nstypes
parent8bad12c97d8c4eb543ed21fbda9c894b407db892 (diff)
downloadAtlas-27d3a7a684a00d729db630d3901c6ecf8fed8550.tar.gz
Atlas-27d3a7a684a00d729db630d3901c6ecf8fed8550.zip
pkg/nstypes: Quote GoString value correctly
Diffstat (limited to 'pkg/nstypes')
-rw-r--r--pkg/nstypes/maps.go4
-rw-r--r--pkg/nstypes/playlists.go4
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.