You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make some adjustments to the Slack notifier, but my changes aren't being reflected in the build. I must be missing something, maybe there's some Golang package/include behaviour that I don't understand.
How can we build the project with the top-level slack.go file?
My process so far:
# Download the project
git clone https://github.com/sourcegraph/checkup.git
cd checkup
# ... make some changes to ./slack.go - ie. changed the title of the message that gets posted,# line 34 from "Status" to "Statusss"# Also add several log lines, both `fmt.Printf` and `log.Printf`# ... also create a ./checkup.json file with an intentionally-failing check and a valid notifier# Build locally, as per docscd cmd/checkup/
go get -v -d
go build -v -ldflags '-s' -o ../../checkup
# Move back up and test the binarycd ../../
./checkup
== Fake Website - https://fake.site
Threshold: 0s
Max: 28.6472ms
Min: 28.6472ms
Median: 28.6472ms
Mean: 28.6472ms
All: [{28.6472ms Get https://fake.site: dial tcp: lookup fake.site on 192.168.65.1:53: no such host}]
Assessment: down
# All done - check Slack for message.
The message is posted to Slack, but the title isn't the modified "Statusss" that I expect. I also don't see any of the debug logs that I inserted.
Am I missing a step to properly include the Slack notifier in a build? Is it imported from somewhere not local?
Activity
mattberther commentedon Oct 14, 2019
I encountered this earlier when implementing #100. Specifically, I was cloning it, like you, outside of my GOPATH.
The trick for me was following the Getting Started steps (using
go getto have it in my GOAPTH) from https://github.com/sourcegraph/checkup/blob/master/CONTRIBUTING.md.