aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2018-08-22 03:17:59 +0000
committerChristine Dodrill <me@christine.website>2018-08-22 03:17:59 +0000
commit6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393 (patch)
tree60bd319655e77afb0e3737cc9070d5111a41f22b /vendor/github.com/google
parent5a8b8dc48f33c44fd41ac27c1fb4185de1d87d41 (diff)
downloadxesite-6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393.tar.xz
xesite-6b7d6dcc49c6cbd83af70d97d01b700c8fb0c393.zip
add analytics via segment again
Diffstat (limited to 'vendor/github.com/google')
-rw-r--r--vendor/github.com/google/gops/LICENSE27
-rw-r--r--vendor/github.com/google/gops/agent/agent_test.go67
2 files changed, 27 insertions, 67 deletions
diff --git a/vendor/github.com/google/gops/LICENSE b/vendor/github.com/google/gops/LICENSE
new file mode 100644
index 0000000..55e52a0
--- /dev/null
+++ b/vendor/github.com/google/gops/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/google/gops/agent/agent_test.go b/vendor/github.com/google/gops/agent/agent_test.go
deleted file mode 100644
index cc2a440..0000000
--- a/vendor/github.com/google/gops/agent/agent_test.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package agent
-
-import (
- "os"
- "testing"
-)
-
-func TestListen(t *testing.T) {
- err := Listen(nil)
- if err != nil {
- t.Fatal(err)
- }
- Close()
-}
-
-func TestAgentClose(t *testing.T) {
- err := Listen(nil)
- if err != nil {
- t.Fatal(err)
- }
- Close()
- _, err = os.Stat(portfile)
- if !os.IsNotExist(err) {
- t.Fatalf("portfile = %q doesn't exist; err = %v", portfile, err)
- }
- if portfile != "" {
- t.Fatalf("got = %q; want empty portfile", portfile)
- }
-}
-
-func TestAgentListenMultipleClose(t *testing.T) {
- err := Listen(nil)
- if err != nil {
- t.Fatal(err)
- }
- Close()
- Close()
- Close()
- Close()
-}
-
-func TestFormatBytes(t *testing.T) {
- tests := []struct {
- val uint64
- want string
- }{
- {1023, "1023 bytes"},
- {1024, "1.00KB (1024 bytes)"},
- {1024*1024 - 100, "1023.90KB (1048476 bytes)"},
- {1024 * 1024, "1.00MB (1048576 bytes)"},
- {1024 * 1025, "1.00MB (1049600 bytes)"},
- {1024 * 1024 * 1024, "1.00GB (1073741824 bytes)"},
- {1024*1024*1024 + 430*1024*1024, "1.42GB (1524629504 bytes)"},
- {1024 * 1024 * 1024 * 1024 * 1024, "1.00PB (1125899906842624 bytes)"},
- {1024 * 1024 * 1024 * 1024 * 1024 * 1024, "1024.00PB (1152921504606846976 bytes)"},
- }
- for _, tt := range tests {
- result := formatBytes(tt.val)
- if result != tt.want {
- t.Errorf("formatBytes(%v) = %q; want %q", tt.val, result, tt.want)
- }
- }
-}