Add tool dir.
This commit is contained in:
parent
aed1ee2001
commit
c5de9ce9eb
@ -6,7 +6,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tank/code/result"
|
"tank/code/result"
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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
4
code/cache/cache.go
vendored
@ -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...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package code
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/code/result"
|
"tank/code/result"
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/code/result"
|
"tank/code/result"
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
//@Service
|
//@Service
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"tank/code/util"
|
"tank/code/tool/util"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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 (
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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 {
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user