Skip to content

Commit 1578770

Browse files
author
Emmanuel T Odeke
authored
Merge pull request #6 from cuonglm/fix-github-action-branch
2 parents 17423c9 + 29b50f5 commit 1578770

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- main
88

99
jobs:
1010
test:

sample/secrets.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ func main() {
2525
println(string(blob))
2626
}
2727

28-
type credentials struct {
29-
Secret string `json:"secret"`
30-
}
31-
3228
func authenticate(rw http.ResponseWriter, req *http.Request) {
3329
secret := req.Header.Get("x-secret")
3430
if secret != "open-sesame" {
3531
http.Error(rw, "unauthorized, please set header", http.StatusUnauthorized)
3632
}
37-
rw.Write([]byte(`{"secret_location":"23.4162° N, 25.6628° E"}`))
33+
_, _ = rw.Write([]byte(`{"secret_location":"23.4162° N, 25.6628° E"}`))
3834
}

0 commit comments

Comments
 (0)