mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 10:00:13 +00:00
Pin SHOUT library at working version
The version we did have has a bug of not importing 'time'. Remove other vendor'd copy of SHOUT library which may or may not be used.
This commit is contained in:
1
extras/example/vendor/github.com/richo/GOSHOUT/README.MD
generated
vendored
1
extras/example/vendor/github.com/richo/GOSHOUT/README.MD
generated
vendored
@@ -1 +0,0 @@
|
||||
GOLANG LIBRARY TO PROD [SHOUTCLOUD](SHOUTCLOUD.IO)
|
||||
46
extras/example/vendor/github.com/richo/GOSHOUT/SHOUT.go
generated
vendored
46
extras/example/vendor/github.com/richo/GOSHOUT/SHOUT.go
generated
vendored
@@ -1,46 +0,0 @@
|
||||
package SHOUTCLOUD
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type SHOUTREQUEST struct {
|
||||
INPUT string
|
||||
}
|
||||
|
||||
type SHOUTRESPONSE struct {
|
||||
INPUT string
|
||||
OUTPUT string
|
||||
}
|
||||
|
||||
func UPCASE(THING_TO_YELL string) (string, error) {
|
||||
REQUEST := &SHOUTREQUEST{THING_TO_YELL}
|
||||
ENCODED, ERR := json.Marshal(REQUEST)
|
||||
if ERR != nil {
|
||||
return "", errors.New("COULDN'T MARSHALL THE REQUEST")
|
||||
}
|
||||
READER := bytes.NewReader(ENCODED)
|
||||
|
||||
// NO TLS, SO MUCH SADNESS.
|
||||
RESP, ERR := http.Post("http://API.SHOUTCLOUD.IO/V1/SHOUT",
|
||||
"application/json", READER)
|
||||
if ERR != nil {
|
||||
return "", errors.New("REQUEST FAILED CAN'T UPCASE ERROR MESSAGE HALP")
|
||||
}
|
||||
|
||||
BODYBYTES, ERR := ioutil.ReadAll(RESP.Body)
|
||||
if ERR != nil {
|
||||
return "", errors.New("COULDN'T READ BODY HALP")
|
||||
}
|
||||
|
||||
var BODY SHOUTRESPONSE
|
||||
if json.Unmarshal(BODYBYTES, &BODY) != nil {
|
||||
return "", errors.New("COULDN'T UNPACK RESPONSE")
|
||||
}
|
||||
|
||||
return BODY.OUTPUT, nil
|
||||
}
|
||||
11
extras/example/vendor/manifest
vendored
11
extras/example/vendor/manifest
vendored
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"version": 0,
|
||||
"dependencies": [
|
||||
{
|
||||
"importpath": "github.com/richo/GOSHOUT",
|
||||
"repository": "https://github.com/richo/GOSHOUT",
|
||||
"revision": "da80b9993cbabeba5d04ee1c31688313dd730ad8",
|
||||
"branch": "master"
|
||||
}
|
||||
]
|
||||
}
|
||||
2
go.mod
2
go.mod
@@ -58,7 +58,7 @@ require (
|
||||
github.com/peterbourgon/runsvinit v2.0.0+incompatible
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/prometheus/client_golang v1.5.0
|
||||
github.com/richo/GOSHOUT v0.0.0-20190205170632-a1a6db7f26e9
|
||||
github.com/richo/GOSHOUT v0.0.0-20160308183402-8e98c504bfae
|
||||
github.com/russross/blackfriday v0.0.0-20151020174500-a18a46c9b943 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20150822220530-244f5ac324cb // indirect
|
||||
github.com/sirupsen/logrus v1.4.2
|
||||
|
||||
2
go.sum
2
go.sum
@@ -266,6 +266,8 @@ github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURm
|
||||
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||
github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/richo/GOSHOUT v0.0.0-20160308183402-8e98c504bfae h1:/NoALPFmRKJ/attvODMptyCS0DUsPeiXYC5LfqV0ecM=
|
||||
github.com/richo/GOSHOUT v0.0.0-20160308183402-8e98c504bfae/go.mod h1:MSTsYcO3SGF1j/eewqZORAzbp3BUbisi2094EDP3+To=
|
||||
github.com/richo/GOSHOUT v0.0.0-20190205170632-a1a6db7f26e9 h1:2bCoptIvAKQ1O70dbwQHob8Pop8zIXJHlnVLRtf9pG8=
|
||||
github.com/richo/GOSHOUT v0.0.0-20190205170632-a1a6db7f26e9/go.mod h1:MSTsYcO3SGF1j/eewqZORAzbp3BUbisi2094EDP3+To=
|
||||
github.com/russross/blackfriday v0.0.0-20151020174500-a18a46c9b943 h1:Bn2ofKCNwK+UtM3PAsMzGGaxgViklwyVrl1cyzsHHGc=
|
||||
|
||||
8
vendor/github.com/richo/GOSHOUT/SHOUT.go
generated
vendored
8
vendor/github.com/richo/GOSHOUT/SHOUT.go
generated
vendored
@@ -25,19 +25,13 @@ func UPCASE(THING_TO_YELL string) (string, error) {
|
||||
}
|
||||
READER := bytes.NewReader(ENCODED)
|
||||
|
||||
CLIENT := &http.Client{
|
||||
Timeout:time.Second * 20,
|
||||
}
|
||||
|
||||
// NO TLS, SO MUCH SADNESS.
|
||||
RESP, ERR := CLIENT.Post("http://API.SHOUTCLOUD.IO/V1/SHOUT",
|
||||
RESP, ERR := http.Post("http://API.SHOUTCLOUD.IO/V1/SHOUT",
|
||||
"application/json", READER)
|
||||
if ERR != nil {
|
||||
return "", errors.New("REQUEST FAILED CAN'T UPCASE ERROR MESSAGE HALP")
|
||||
}
|
||||
|
||||
defer RESP.Body.Close()
|
||||
|
||||
BODYBYTES, ERR := ioutil.ReadAll(RESP.Body)
|
||||
if ERR != nil {
|
||||
return "", errors.New("COULDN'T READ BODY HALP")
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -269,7 +269,7 @@ github.com/prometheus/common/model
|
||||
github.com/prometheus/procfs
|
||||
github.com/prometheus/procfs/internal/fs
|
||||
github.com/prometheus/procfs/internal/util
|
||||
# github.com/richo/GOSHOUT v0.0.0-20190205170632-a1a6db7f26e9
|
||||
# github.com/richo/GOSHOUT v0.0.0-20160308183402-8e98c504bfae
|
||||
github.com/richo/GOSHOUT
|
||||
# github.com/russross/blackfriday v0.0.0-20151020174500-a18a46c9b943
|
||||
github.com/russross/blackfriday
|
||||
|
||||
Reference in New Issue
Block a user