forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmascot.go
49 lines (43 loc) · 1.5 KB
/
mascot.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
package gateway
import (
"fmt"
"net/http"
"strings"
"sync"
)
const mascotHeaderKeyFormat = "X-Mascot-%03d"
var oneMascot sync.Once
func addMascotHeaders(w http.ResponseWriter) {
oneMascot.Do(func() {
xMascot := strings.Split(mascot, "\n")
for i := 0; i < len(xMascot); i++ {
key := fmt.Sprintf(mascotHeaderKeyFormat, i)
w.Header().Set(key, xMascot[i])
}
})
}
const mascot = `
. ╲╲╲╲╲╲
. ╲╲╲╲╲╲╲╲╲
. *******╲╲╲╲╲╲╲╲╲╲╲
. **********╲╲╲╲╲╲╲╲╲╲
. ***************╲╲╲╲╲╲╲╲╲╲
. ******************╲╲╲╲╲╲╲╲╲
. ********************╲╲╲╲╲╲╲╲╲
. ***********************╲╲╲╲╲╲╲╲
. *************************** ╲╲╲╲╲╲
. **************************** ╲╲╲
. ***** ******* **** _______ _ _
. ****** ***** ***** |__ __| | | (_)
. **************************** | | _ _ | | __ _ ___
. ***************************** | || | | || |/ / | | / _ \
. ****************************** | || |_| || < _ | || (_) |
. ******************************** |_| \__, ||_|\_\(_)|_| \___/
. ********************************* __/ |
. *** ************* ********* **** |___/
. *********************
. *****************
. ******* ******
. ***** *****
. ****** ******
`