Format and specification code

This commit is contained in:
vCaesar
2017-06-30 23:38:12 +08:00
parent 8ab68b8423
commit ab37b3f8f4
6 changed files with 17 additions and 8 deletions

View File

@@ -39,10 +39,11 @@ CREATE TABLE `userdetail` (
package main
import (
_ "github.com/go-sql-driver/mysql"
"database/sql"
"fmt"
//"time"
_ "github.com/go-sql-driver/mysql"
)
func main() {

View File

@@ -38,6 +38,7 @@ import (
"database/sql"
"fmt"
"time"
_ "github.com/mattn/go-sqlite3"
)

View File

@@ -47,6 +47,7 @@ package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
)

View File

@@ -22,11 +22,12 @@ package main
import (
"fmt"
"github.com/garyburd/redigo/redis"
"os"
"os/signal"
"os/signal"
"syscall"
"time"
"github.com/garyburd/redigo/redis"
)
var (
@@ -103,8 +104,9 @@ https://github.com/astaxie/goredis
package main
import (
"github.com/astaxie/goredis"
"fmt"
"github.com/astaxie/goredis"
)
func main() {
@@ -158,9 +160,10 @@ package main
import (
"fmt"
"log"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"log"
)
type Person struct {

View File

@@ -68,9 +68,10 @@ package main
import (
"fmt"
"github.com/julienschmidt/httprouter"
"log"
"net/http"
"github.com/julienschmidt/httprouter"
)
func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {

View File

@@ -33,8 +33,9 @@ log.WithFields(log.Fields{
package main
import (
log "github.com/Sirupsen/logrus"
"os"
log "github.com/Sirupsen/logrus"
)
func init() {
@@ -122,8 +123,9 @@ package logs
import (
// "errors"
"fmt"
seelog "github.com/cihub/seelog"
// "io"
seelog "github.com/cihub/seelog"
)
var Logger seelog.LoggerInterface