Skip to content

Commit ab37b3f

Browse files
committed
Format and specification code
1 parent 8ab68b8 commit ab37b3f

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

zh/05.2.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ CREATE TABLE `userdetail` (
3939
package main
4040

4141
import (
42-
_ "github.com/go-sql-driver/mysql"
4342
"database/sql"
4443
"fmt"
4544
//"time"
45+
46+
_ "github.com/go-sql-driver/mysql"
4647
)
4748

4849
func main() {

zh/05.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
"database/sql"
3939
"fmt"
4040
"time"
41+
4142
_ "github.com/mattn/go-sqlite3"
4243
)
4344

zh/05.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ package main
4747
import (
4848
"database/sql"
4949
"fmt"
50+
5051
_ "github.com/lib/pq"
5152
)
5253

zh/05.6.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ package main
2222

2323
import (
2424
"fmt"
25-
"github.com/garyburd/redigo/redis"
2625
"os"
27-
"os/signal"
26+
"os/signal"
2827
"syscall"
2928
"time"
29+
30+
"github.com/garyburd/redigo/redis"
3031
)
3132

3233
var (
@@ -103,8 +104,9 @@ https://github.com/astaxie/goredis
103104
package main
104105

105106
import (
106-
"github.com/astaxie/goredis"
107107
"fmt"
108+
109+
"github.com/astaxie/goredis"
108110
)
109111

110112
func main() {
@@ -158,9 +160,10 @@ package main
158160

159161
import (
160162
"fmt"
163+
"log"
164+
161165
"gopkg.in/mgo.v2"
162166
"gopkg.in/mgo.v2/bson"
163-
"log"
164167
)
165168

166169
type Person struct {

zh/08.3.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ package main
6868

6969
import (
7070
"fmt"
71-
"github.com/julienschmidt/httprouter"
7271
"log"
7372
"net/http"
73+
74+
"github.com/julienschmidt/httprouter"
7475
)
7576

7677
func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {

zh/12.1.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ log.WithFields(log.Fields{
3333
package main
3434

3535
import (
36-
log "github.com/Sirupsen/logrus"
3736
"os"
37+
38+
log "github.com/Sirupsen/logrus"
3839
)
3940

4041
func init() {
@@ -122,8 +123,9 @@ package logs
122123
import (
123124
// "errors"
124125
"fmt"
125-
seelog "github.com/cihub/seelog"
126126
// "io"
127+
128+
seelog "github.com/cihub/seelog"
127129
)
128130

129131
var Logger seelog.LoggerInterface

0 commit comments

Comments
 (0)