mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-16 19:32:27 +08:00
update
This commit is contained in:
@@ -29,7 +29,7 @@ func PostsCount() {
|
|||||||
baseUrl := setting.Conf.Disqus.PostsCount + "?api_key=" + setting.Conf.Disqus.PublicKey + "&forum=" + setting.Conf.Disqus.ShortName + "&"
|
baseUrl := setting.Conf.Disqus.PostsCount + "?api_key=" + setting.Conf.Disqus.PublicKey + "&forum=" + setting.Conf.Disqus.ShortName + "&"
|
||||||
var count, index int
|
var count, index int
|
||||||
for index < len(Ei.Articles) {
|
for index < len(Ei.Articles) {
|
||||||
logd.Debugf("count=====%d, index=======%d, length=======%d, bool=========%t", count, index, len(Ei.Articles), index < len(Ei.Articles) && count < 50)
|
logd.Debugf("count=====%d, index=======%d, length=======%d, bool=========%t\n", count, index, len(Ei.Articles), index < len(Ei.Articles) && count < 50)
|
||||||
var threads []string
|
var threads []string
|
||||||
for ; index < len(Ei.Articles) && count < 50; index++ {
|
for ; index < len(Ei.Articles) && count < 50; index++ {
|
||||||
artc := Ei.Articles[index]
|
artc := Ei.Articles[index]
|
||||||
|
|||||||
38
glide.lock
generated
38
glide.lock
generated
@@ -1,27 +1,28 @@
|
|||||||
hash: 4b70e76a2e830e97033c06d0e5a90c3199985ff5070bdf8364b1feca63d5caa5
|
hash: 4b70e76a2e830e97033c06d0e5a90c3199985ff5070bdf8364b1feca63d5caa5
|
||||||
updated: 2016-10-02T03:49:24.76719466+08:00
|
updated: 2016-11-12T02:35:12.289411301+08:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/boj/redistore
|
- name: github.com/boj/redistore
|
||||||
version: fc113767cd6b051980f260d6dbe84b2740c46ab0
|
version: fc113767cd6b051980f260d6dbe84b2740c46ab0
|
||||||
- name: github.com/eiblog/blackfriday
|
- name: github.com/eiblog/blackfriday
|
||||||
version: 53e24c296953e3463c7e310dfab69f5e9ad0be62
|
version: c0ec111761ae784fe31cc076f2fa0e2d2216d623
|
||||||
- name: github.com/eiblog/utils
|
- name: github.com/eiblog/utils
|
||||||
version: ed3ca0d59259a3ca13b1a1970cec5bacd25c0414
|
version: 9ae244bfa2feec3e339a26190a56093fde200288
|
||||||
subpackages:
|
subpackages:
|
||||||
- logd
|
- logd
|
||||||
- mgo
|
- mgo
|
||||||
- tmpl
|
- tmpl
|
||||||
|
- uuid
|
||||||
- name: github.com/garyburd/redigo
|
- name: github.com/garyburd/redigo
|
||||||
version: ffa8d46ada782d81cfda81a0fbd9f45ceae448e8
|
version: 80f7de34463b0ed3d7c61303e5619efe1b227f92
|
||||||
subpackages:
|
subpackages:
|
||||||
- redis
|
|
||||||
- internal
|
- internal
|
||||||
|
- redis
|
||||||
- name: github.com/gin-gonic/contrib
|
- name: github.com/gin-gonic/contrib
|
||||||
version: 547e518040cfb96576b507d2f26779ab9c6fc829
|
version: cf28f84316e50a05a59d174b37c26ad9a43a1201
|
||||||
subpackages:
|
subpackages:
|
||||||
- sessions
|
- sessions
|
||||||
- name: github.com/gin-gonic/gin
|
- name: github.com/gin-gonic/gin
|
||||||
version: f931d1ea80ae95a6fc739213cdd9399bd2967fb6
|
version: bb159f9260a262fccbdbd6f37f8575d1e7e6aaa0
|
||||||
subpackages:
|
subpackages:
|
||||||
- binding
|
- binding
|
||||||
- render
|
- render
|
||||||
@@ -32,7 +33,7 @@ imports:
|
|||||||
- name: github.com/gorilla/context
|
- name: github.com/gorilla/context
|
||||||
version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42
|
version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42
|
||||||
- name: github.com/gorilla/securecookie
|
- name: github.com/gorilla/securecookie
|
||||||
version: c13558c2b1c44da35e0eb043053609a5ba3a1f19
|
version: fa5329f913702981df43dcb2a380bac429c810b5
|
||||||
- name: github.com/gorilla/sessions
|
- name: github.com/gorilla/sessions
|
||||||
version: ca9ada44574153444b00d3fd9c8559e4cc95f896
|
version: ca9ada44574153444b00d3fd9c8559e4cc95f896
|
||||||
- name: github.com/manucorporat/sse
|
- name: github.com/manucorporat/sse
|
||||||
@@ -49,9 +50,28 @@ imports:
|
|||||||
version: 3f83fa5005286a7fe593b055f0d7771a7dce4655
|
version: 3f83fa5005286a7fe593b055f0d7771a7dce4655
|
||||||
subpackages:
|
subpackages:
|
||||||
- bson
|
- bson
|
||||||
|
- internal/json
|
||||||
- internal/sasl
|
- internal/sasl
|
||||||
- internal/scram
|
- internal/scram
|
||||||
- internal/json
|
|
||||||
- name: gopkg.in/yaml.v2
|
- name: gopkg.in/yaml.v2
|
||||||
version: a5b47d31c556af34a302ce5d659e6fea44d90de0
|
version: a5b47d31c556af34a302ce5d659e6fea44d90de0
|
||||||
|
- name: qiniupkg.com/api.v7
|
||||||
|
version: ad7023b87b2f5c169812da49fe44900be1c4e5c2
|
||||||
|
subpackages:
|
||||||
|
- api
|
||||||
|
- auth/qbox
|
||||||
|
- conf
|
||||||
|
- kodo
|
||||||
|
- kodocli
|
||||||
|
- name: qiniupkg.com/x
|
||||||
|
version: f512abcf45ab4e2ba0fd4784c57b53d495997d66
|
||||||
|
subpackages:
|
||||||
|
- bytes.v7
|
||||||
|
- bytes.v7/seekable
|
||||||
|
- ctype.v7
|
||||||
|
- log.v7
|
||||||
|
- reqid.v7
|
||||||
|
- rpc.v7
|
||||||
|
- url.v7
|
||||||
|
- xlog.v7
|
||||||
testImports: []
|
testImports: []
|
||||||
|
|||||||
4
qiniu.go
4
qiniu.go
@@ -49,7 +49,7 @@ func upload(typ string, filepath string) {
|
|||||||
|
|
||||||
file, err := os.Open(filepath)
|
file, err := os.Open(filepath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logd.Debugf("%s", err.Error())
|
logd.Debugf("%s\n", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data, err := ioutil.ReadAll(file)
|
data, err := ioutil.ReadAll(file)
|
||||||
@@ -83,7 +83,7 @@ func upload(typ string, filepath string) {
|
|||||||
res := uploader.PutFile(nil, &ret, token, key, filepath, &extra)
|
res := uploader.PutFile(nil, &ret, token, key, filepath, &extra)
|
||||||
// 打印返回的信息
|
// 打印返回的信息
|
||||||
if res != nil {
|
if res != nil {
|
||||||
logd.Debugf("failed to upload patch file: %v", res)
|
logd.Debugf("failed to upload patch file: %v\n", res)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
if setting.Conf.RunMode == setting.PROD {
|
if setting.Conf.RunMode == setting.PROD {
|
||||||
gin.SetMode(gin.ReleaseMode)
|
gin.SetMode(gin.ReleaseMode)
|
||||||
// set log print level
|
|
||||||
logd.SetLevel(logd.Lerror)
|
logd.SetLevel(logd.Lerror)
|
||||||
}
|
}
|
||||||
router = gin.Default()
|
router = gin.Default()
|
||||||
|
|||||||
Reference in New Issue
Block a user