forked from markusdosch/gopherlol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.go
59 lines (44 loc) · 1.65 KB
/
commands.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package commands
import (
"fmt"
"net/url"
)
type Commands struct{}
func (c *Commands) Help() {
// We want this method to show up in `help`/`list` results
// But the actual logic for these commands is in `main.go`
}
func (c *Commands) List() {
// We want this method to show up in `help`/`list` results
// But the actual logic for these commands is in `main.go`
}
func (c *Commands) G(cmdArg string) string {
return fmt.Sprintf("https://www.google.com/#q=%s", url.QueryEscape(cmdArg))
}
func (c *Commands) So(cmdArg string) string {
return fmt.Sprintf("https://stackoverflow.com/search?q=%s", url.QueryEscape(cmdArg))
}
func (c *Commands) Pr(cmdArg string) string {
return fmt.Sprintf("https://github.com/CamusEnergy/bando/pull/%s", url.QueryEscape(cmdArg))
}
func (c *Commands) Gh(cmdArg string) string {
return fmt.Sprintf("https://github.com/search?q=org%3ACamusEnergy+%s&type=code", url.QueryEscape(cmdArg))
}
func (c *Commands) Bando(cmdArg string) string {
return "https://github.com/CamusEnergy/bando/tree/master"
}
func (c *Commands) Gt(cmdArg string) string {
return "https://app.graphite.dev/"
}
func (c *Commands) Cci(cmdArg string) string {
return fmt.Sprintf("https://app.circleci.com/pipelines/github/CamusEnergy/bando?filter=all", url.QueryEscape(cmdArg))
}
func (c *Commands) Ar(cmdArg string) string {
return "https://console.cloud.google.com/artifacts?project=camus-infra"
}
func (c *Commands) Gc(cmdArg string) string {
return fmt.Sprintf("https://console.cloud.google.com/welcome?project=%s", url.QueryEscape(cmdArg))
}
func (c *Commands) Go(cmdArg string) string {
return fmt.Sprintf("https://go.grid.dev/%s", url.QueryEscape(cmdArg))
}