使用go mod

This commit is contained in:
hoteas 2022-03-13 01:12:29 +08:00
parent 8265e24add
commit e49164fa81
19 changed files with 33 additions and 32 deletions

View File

@ -1,11 +1,11 @@
package hotime package hotime
import ( import (
. "./cache" . "code.hoteas.com/golang/hotime/cache"
"./code" "code.hoteas.com/golang/hotime/code"
. "./common" . "code.hoteas.com/golang/hotime/common"
. "./db" . "code.hoteas.com/golang/hotime/db"
. "./log" . "code.hoteas.com/golang/hotime/log"
"database/sql" "database/sql"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"io" "io"

2
cache/cache.go vendored
View File

@ -1,7 +1,7 @@
package cache package cache
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
"errors" "errors"
) )

2
cache/cache_db.go vendored
View File

@ -1,7 +1,7 @@
package cache package cache
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
"database/sql" "database/sql"
"encoding/json" "encoding/json"
"strings" "strings"

View File

@ -1,7 +1,7 @@
package cache package cache
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
"strings" "strings"
"sync" "sync"
"time" "time"

View File

@ -1,7 +1,7 @@
package cache package cache
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
"github.com/garyburd/redigo/redis" "github.com/garyburd/redigo/redis"
"strings" "strings"
"time" "time"

2
cache/type.go vendored
View File

@ -1,7 +1,7 @@
package cache package cache
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
) )
type CacheIns interface { type CacheIns interface {

View File

@ -1,7 +1,7 @@
package hotime package hotime
import ( import (
. "./common" . "code.hoteas.com/golang/hotime/common"
"strings" "strings"
) )

View File

@ -1,7 +1,7 @@
package code package code
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
) )
var Config = Map{ var Config = Map{

View File

@ -1,8 +1,8 @@
package code package code
import ( import (
. "../common" . "code.hoteas.com/golang/hotime/common"
"../db" "code.hoteas.com/golang/hotime/db"
"errors" "errors"
"fmt" "fmt"
"io/ioutil" "io/ioutil"

View File

@ -3,8 +3,8 @@ package code
var InitTpt = `package {{name}} var InitTpt = `package {{name}}
import ( import (
. "../../../hotime" . "code.hoteas.com/golang/hotime"
. "../../../hotime/common" . "code.hoteas.com/golang/hotime/common"
) )
var ID = "{{id}}" var ID = "{{id}}"
@ -69,8 +69,8 @@ var Project = Proj{
var CtrTpt = `package {{name}} var CtrTpt = `package {{name}}
import ( import (
. "../../../hotime" . "code.hoteas.com/golang/hotime"
. "../../../hotime/common" . "code.hoteas.com/golang/hotime/common"
"strings" "strings"
) )

View File

@ -1,9 +1,9 @@
package hotime package hotime
import ( import (
. "./cache" . "code.hoteas.com/golang/hotime/cache"
. "./common" . "code.hoteas.com/golang/hotime/common"
. "./db" . "code.hoteas.com/golang/hotime/db"
"encoding/json" "encoding/json"
"net/http" "net/http"
) )

View File

@ -1,8 +1,8 @@
package db package db
import ( import (
"../cache" "code.hoteas.com/golang/hotime/cache"
. "../common" . "code.hoteas.com/golang/hotime/common"
"database/sql" "database/sql"
"encoding/json" "encoding/json"
"errors" "errors"

View File

@ -1,7 +1,7 @@
package aliyun package aliyun
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"net/http" "net/http"

View File

@ -1,8 +1,8 @@
package download package download
import ( import (
. "../../common"
"bytes" "bytes"
. "code.hoteas.com/golang/hotime/common"
"io" "io"
"io/ioutil" "io/ioutil"
"net/http" "net/http"

View File

@ -1,7 +1,7 @@
package tencent package tencent
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
"crypto/hmac" "crypto/hmac"
"crypto/sha1" "crypto/sha1"
"encoding/base64" "encoding/base64"

View File

@ -1,7 +1,7 @@
package upload package upload
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
"errors" "errors"
"io" "io"
"mime/multipart" "mime/multipart"

View File

@ -1,8 +1,8 @@
package main package main
import ( import (
"../../hotime" "code.hoteas.com/golang/hotime"
//"../dri/aliyun" //"code.hoteas.com/golang/hotime/dri/aliyun"
"fmt" "fmt"
"time" "time"
) )
@ -12,4 +12,5 @@ func main() {
fmt.Println(date, date.Unix()) fmt.Println(date, date.Unix())
//fmt.Println("0123456"[1:7]) //fmt.Println("0123456"[1:7])
appIns := hotime.Init("config/config.json") appIns := hotime.Init("config/config.json")
appIns.Run(hotime.Router{})
} }

View File

@ -1,8 +1,8 @@
package hotime package hotime
import ( import (
. "./cache" . "code.hoteas.com/golang/hotime/cache"
. "./common" . "code.hoteas.com/golang/hotime/common"
) )
//session对象 //session对象

2
var.go
View File

@ -1,7 +1,7 @@
package hotime package hotime
import ( import (
. "./common" . "code.hoteas.com/golang/hotime/common"
) )
var IsRun = false //当前状态 var IsRun = false //当前状态