Skip to content

Commit e899771

Browse files
chore: Deleted spaces (#2622)
1 parent b01605b commit e899771

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ matrix:
77
env: GO111MODULE=on
88
- go: 1.13.x
99
- go: 1.13.x
10-
env:
10+
env:
1111
- TESTTAGS=nomsgpack
1212
- go: 1.14.x
1313
- go: 1.14.x

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ People and companies, who have contributed, in alphabetical order.
156156
- Fix variadic parameter in the flexible render API
157157
- Fix Corrupted plain render
158158
- Add Pluggable View Renderer Example
159-
159+
160160

161161
**@msemenistyi (Mykyta Semenistyi)**
162162
- update Readme.md. Add code to String method

BENCHMARKS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
# Benchmark System
33

4-
**VM HOST:** Travis
5-
**Machine:** Ubuntu 16.04.6 LTS x64
6-
**Date:** May 04th, 2020
4+
**VM HOST:** Travis
5+
**Machine:** Ubuntu 16.04.6 LTS x64
6+
**Date:** May 04th, 2020
77
**Version:** Gin v1.6.3
8-
**Go Version:** 1.14.2 linux/amd64
8+
**Go Version:** 1.14.2 linux/amd64
99
**Source:** [Go HTTP Router Benchmark](https://github.com/gin-gonic/go-http-routing-benchmark)
1010
**Result:** [See the gist](https://gist.github.com/appleboy/b5f2ecfaf50824ae9c64dcfb9165ae5e) or [Travis result](https://travis-ci.org/github/gin-gonic/go-http-routing-benchmark/jobs/682947061)
1111

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@
215215

216216
## Gin 1.1
217217

218-
- [NEW] Implement QueryArray and PostArray methods
219-
- [NEW] Refactor GetQuery and GetPostForm
220-
- [NEW] Add contribution guide
218+
- [NEW] Implement QueryArray and PostArray methods
219+
- [NEW] Refactor GetQuery and GetPostForm
220+
- [NEW] Add contribution guide
221221
- [FIX] Corrected typos in README
222-
- [FIX] Removed additional Iota
223-
- [FIX] Changed imports to gopkg instead of github in README (#733)
222+
- [FIX] Removed additional Iota
223+
- [FIX] Changed imports to gopkg instead of github in README (#733)
224224
- [FIX] Logger: skip ANSI color commands if output is not a tty
225225

226226
## Gin 1.0rc2 (...)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Contributing
1+
## Contributing
22

33
- With issues:
44
- Use the search tool before opening a new issue.

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ import "net/http"
103103
```
104104

105105
## Quick start
106-
106+
107107
```sh
108108
# assume the following codes in example.go file
109109
$ cat example.go
@@ -588,44 +588,44 @@ func main() {
588588
::1 - [Fri, 07 Dec 2018 17:04:38 JST] "GET /ping HTTP/1.1 200 122.767µs "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36" "
589589
```
590590

591-
### Controlling Log output coloring
591+
### Controlling Log output coloring
592592

593593
By default, logs output on console should be colorized depending on the detected TTY.
594594

595-
Never colorize logs:
595+
Never colorize logs:
596596

597597
```go
598598
func main() {
599599
// Disable log's color
600600
gin.DisableConsoleColor()
601-
601+
602602
// Creates a gin router with default middleware:
603603
// logger and recovery (crash-free) middleware
604604
router := gin.Default()
605-
605+
606606
router.GET("/ping", func(c *gin.Context) {
607607
c.String(200, "pong")
608608
})
609-
609+
610610
router.Run(":8080")
611611
}
612612
```
613613

614-
Always colorize logs:
614+
Always colorize logs:
615615

616616
```go
617617
func main() {
618618
// Force log's color
619619
gin.ForceConsoleColor()
620-
620+
621621
// Creates a gin router with default middleware:
622622
// logger and recovery (crash-free) middleware
623623
router := gin.Default()
624-
624+
625625
router.GET("/ping", func(c *gin.Context) {
626626
c.String(200, "pong")
627627
})
628-
628+
629629
router.Run(":8080")
630630
}
631631
```
@@ -667,12 +667,12 @@ func main() {
667667
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
668668
return
669669
}
670-
670+
671671
if json.User != "manu" || json.Password != "123" {
672672
c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"})
673673
return
674-
}
675-
674+
}
675+
676676
c.JSON(http.StatusOK, gin.H{"status": "you are logged in"})
677677
})
678678

@@ -688,12 +688,12 @@ func main() {
688688
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
689689
return
690690
}
691-
691+
692692
if xml.User != "manu" || xml.Password != "123" {
693693
c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"})
694694
return
695-
}
696-
695+
}
696+
697697
c.JSON(http.StatusOK, gin.H{"status": "you are logged in"})
698698
})
699699

@@ -705,12 +705,12 @@ func main() {
705705
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
706706
return
707707
}
708-
708+
709709
if form.User != "manu" || form.Password != "123" {
710710
c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"})
711711
return
712-
}
713-
712+
}
713+
714714
c.JSON(http.StatusOK, gin.H{"status": "you are logged in"})
715715
})
716716

@@ -807,7 +807,7 @@ $ curl "localhost:8085/bookable?check_in=2030-03-10&check_out=2030-03-09"
807807
{"error":"Key: 'Booking.CheckOut' Error:Field validation for 'CheckOut' failed on the 'gtfield' tag"}
808808

809809
$ curl "localhost:8085/bookable?check_in=2000-03-09&check_out=2000-03-10"
810-
{"error":"Key: 'Booking.CheckIn' Error:Field validation for 'CheckIn' failed on the 'bookabledate' tag"}%
810+
{"error":"Key: 'Booking.CheckIn' Error:Field validation for 'CheckIn' failed on the 'bookabledate' tag"}%
811811
```
812812

813813
[Struct level validations](https://github.com/go-playground/validator/releases/tag/v8.7) can also be registered this way.
@@ -1145,7 +1145,7 @@ func main() {
11451145
data := gin.H{
11461146
"foo": "bar",
11471147
}
1148-
1148+
11491149
//callback is x
11501150
// Will output : x({\"foo\":\"bar\"})
11511151
c.JSONP(http.StatusOK, data)
@@ -1190,21 +1190,21 @@ This feature is unavailable in Go 1.6 and lower.
11901190
```go
11911191
func main() {
11921192
r := gin.Default()
1193-
1193+
11941194
// Serves unicode entities
11951195
r.GET("/json", func(c *gin.Context) {
11961196
c.JSON(200, gin.H{
11971197
"html": "<b>Hello, world!</b>",
11981198
})
11991199
})
1200-
1200+
12011201
// Serves literal characters
12021202
r.GET("/purejson", func(c *gin.Context) {
12031203
c.PureJSON(200, gin.H{
12041204
"html": "<b>Hello, world!</b>",
12051205
})
12061206
})
1207-
1207+
12081208
// listen and serve on 0.0.0.0:8080
12091209
r.Run(":8080")
12101210
}
@@ -1812,11 +1812,11 @@ func main() {
18121812
// the request it is currently handling
18131813
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
18141814
defer cancel()
1815-
1815+
18161816
if err := srv.Shutdown(ctx); err != nil {
18171817
log.Fatal("Server forced to shutdown:", err)
18181818
}
1819-
1819+
18201820
log.Println("Server exiting")
18211821
}
18221822
```

0 commit comments

Comments
 (0)