Skip to content

Commit a032736

Browse files
committed
Rename from go to indigo
1 parent 4059378 commit a032736

File tree

1 file changed

+7
-7
lines changed
  • frameworks/Go/indigo/src

1 file changed

+7
-7
lines changed

frameworks/Go/indigo/src/app.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (app *App) PopulateCache(ctx context.Context) error {
4040
}
4141

4242
func (app *App) HandleJSON(request *http.Request) *http.Response {
43-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").JSON(&models.Message{
43+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").JSON(&models.Message{
4444
Message: "Hello, World!",
4545
})
4646
}
@@ -55,7 +55,7 @@ func (app *App) HandleDB(request *http.Request) *http.Response {
5555
return http.Error(request, err)
5656
}
5757

58-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").JSON(world)
58+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").JSON(world)
5959
}
6060

6161
func (app *App) HandleQuery(request *http.Request) *http.Response {
@@ -75,7 +75,7 @@ func (app *App) HandleQuery(request *http.Request) *http.Response {
7575
return http.Error(request, err)
7676
}
7777

78-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").JSON(&worlds)
78+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").JSON(&worlds)
7979
}
8080

8181
func (app *App) HandleUpdate(request *http.Request) *http.Response {
@@ -104,7 +104,7 @@ func (app *App) HandleUpdate(request *http.Request) *http.Response {
104104
return http.Error(request, err)
105105
}
106106

107-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").JSON(&worlds)
107+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").JSON(&worlds)
108108
}
109109

110110
func (app *App) HandleCachedQuery(request *http.Request) *http.Response {
@@ -119,7 +119,7 @@ func (app *App) HandleCachedQuery(request *http.Request) *http.Response {
119119
worlds[i] = app.Cache[rand.Int32N(10000)]
120120
}
121121

122-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").JSON(&worlds)
122+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").JSON(&worlds)
123123
}
124124

125125
func (app *App) HandleFortune(request *http.Request) *http.Response {
@@ -142,11 +142,11 @@ func (app *App) HandleFortune(request *http.Request) *http.Response {
142142
return 0
143143
})
144144

145-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").ContentType(mime.HTML).String(templates.HTMLFortunes(fortunes))
145+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").ContentType(mime.HTML).String(templates.HTMLFortunes(fortunes))
146146
}
147147

148148
func (app *App) HandlePlaintext(request *http.Request) *http.Response {
149-
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "go").String("Hello, World!")
149+
return request.Respond().Header("Date", time.Now().Format(time.RFC1123)).Header("Server", "indigo").String("Hello, World!")
150150
}
151151

152152
func normalizeNumber(nString string, found bool) (int, error) {

0 commit comments

Comments
 (0)