summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorClaudio Felber <claudio.felber@perron2.ch>2015-06-27 13:01:14 +0200
committerClaudio Felber <claudio.felber@perron2.ch>2015-06-27 13:01:14 +0200
commit93779987c426b8c09d620aa6bc48b95ffbef282a (patch)
tree65b2d2e3f24b76c22acc4ca59e4e9a04744e9251 /util.go
parent5ab948816dec877984e3c1c031f423cb7fccf30f (diff)
Add SetDashPattern() method
Diffstat (limited to 'util.go')
-rw-r--r--util.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/util.go b/util.go
index d3b114f..ed4ffdd 100644
--- a/util.go
+++ b/util.go
@@ -69,6 +69,19 @@ func bufferFromReader(r io.Reader) (b *bytes.Buffer, err error) {
return
}
+// Returns true if the two specified integer slices are equal
+func slicesEqual(a, b []float64) bool {
+ if len(a) != len(b) {
+ return false
+ }
+ for i := range a {
+ if a[i] != b[i] {
+ return false
+ }
+ }
+ return true
+}
+
// Returns a zlib-compressed copy of the specified byte array
func sliceCompress(data []byte) []byte {
var buf bytes.Buffer