Add tool dir.

This commit is contained in:
zicla 2019-04-26 03:08:22 +08:00
parent aed1ee2001
commit c5de9ce9eb
28 changed files with 23 additions and 22 deletions

View File

@ -6,7 +6,8 @@ import (
"regexp" "regexp"
"strconv" "strconv"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -5,7 +5,7 @@ import (
"tank/code/config" "tank/code/config"
"tank/code/logger" "tank/code/logger"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
) )
type IBean interface { type IBean interface {
@ -46,6 +46,7 @@ func (this *Bean) PanicError(err error) {
//能找到一个user就找到一个 //能找到一个user就找到一个
func (this *Bean) findUser(writer http.ResponseWriter, request *http.Request) *User { func (this *Bean) findUser(writer http.ResponseWriter, request *http.Request) *User {
//验证用户是否已经登录。 //验证用户是否已经登录。
//登录身份有效期以数据库中记录的为准 //登录身份有效期以数据库中记录的为准
sessionId := util.GetSessionUuidFromRequest(request, config.COOKIE_AUTH_KEY) sessionId := util.GetSessionUuidFromRequest(request, config.COOKIE_AUTH_KEY)

4
code/cache/cache.go vendored
View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"sort" "sort"
"sync" "sync"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )
@ -388,7 +388,7 @@ func (table *CacheTable) MostAccessed(count int64) []*CacheItem {
// 打印日志 // 打印日志
func (table *CacheTable) log(format string, v ...interface{}) { func (table *CacheTable) log(format string, v ...interface{}) {
//全局日志记录 //TODO: 全局日志记录
//LOGGER.Info(format, v...) //LOGGER.Info(format, v...)
} }

View File

@ -4,7 +4,7 @@ import (
"github.com/json-iterator/go" "github.com/json-iterator/go"
"io/ioutil" "io/ioutil"
"tank/code/logger" "tank/code/logger"
"tank/code/util" "tank/code/tool/util"
"time" "time"
"unsafe" "unsafe"
) )

View File

@ -1,7 +1,7 @@
package code package code
import ( import (
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -8,7 +8,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
) )
/** /**

View File

@ -10,7 +10,7 @@ import (
"tank/code/dav" "tank/code/dav"
"tank/code/dav/xml" "tank/code/dav/xml"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
) )
/** /**

View File

@ -12,7 +12,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"tank/code/config" "tank/code/config"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -6,7 +6,7 @@ import (
"github.com/nu7hatch/gouuid" "github.com/nu7hatch/gouuid"
"os" "os"
"path/filepath" "path/filepath"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -9,7 +9,7 @@ import (
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
"tank/code/util" "tank/code/tool/util"
) )
//@Service //@Service

View File

@ -13,7 +13,7 @@ import (
"strconv" "strconv"
"tank/code/config" "tank/code/config"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"runtime" "runtime"
"sync" "sync"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"tank/code/config" "tank/code/config"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -3,7 +3,7 @@ package code
import ( import (
"fmt" "fmt"
"tank/code/config" "tank/code/config"
"tank/code/util" "tank/code/tool/util"
) )
const ( const (

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"tank/code/download" "tank/code/download"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
) )
/** /**

View File

@ -3,7 +3,7 @@ package code
import ( import (
"net/http" "net/http"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
) )
type PreferenceController struct { type PreferenceController struct {

View File

@ -10,7 +10,7 @@ import (
"tank/code/config" "tank/code/config"
"tank/code/logger" "tank/code/logger"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )

View File

@ -6,8 +6,7 @@ import (
"strconv" "strconv"
"tank/code/config" "tank/code/config"
"tank/code/result" "tank/code/result"
"tank/code/util" "tank/code/tool/util"
"time" "time"
) )