From 47374dd8c88063d3703836d31cba8020d7bcb66d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 1 Dec 2019 20:21:00 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=87=8D=E6=96=B0=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/wide.go | 6 +++--- editor/editors.go | 10 +++++----- editor/formatter.go | 6 +++--- event/events.go | 2 +- file/exporter.go | 2 +- file/files.go | 8 ++++---- file/outline.go | 2 +- go.mod | 4 ++-- go.sum | 4 ++-- i18n/locales.go | 2 +- main.go | 20 ++++++++++---------- notification/notifications.go | 12 ++++++------ output/build.go | 8 ++++---- output/cross.go | 8 ++++---- output/install.go | 8 ++++---- output/outputs.go | 8 ++++---- output/run.go | 2 +- output/test.go | 8 ++++---- output/vet.go | 8 ++++---- package.json | 2 +- playground/autocomplete.go | 4 ++-- playground/build.go | 6 +++--- playground/file.go | 6 +++--- playground/playgrounds.go | 10 +++++----- playground/run.go | 2 +- session/oauth.go | 8 ++++---- session/processes.go | 6 +++--- session/sessions.go | 8 ++++---- session/users.go | 6 +++--- views/about.html | 2 +- views/index.html | 2 +- views/login.html | 9 --------- 32 files changed, 95 insertions(+), 104 deletions(-) diff --git a/conf/wide.go b/conf/wide.go index 06c6f0a..45689f2 100644 --- a/conf/wide.go +++ b/conf/wide.go @@ -27,8 +27,8 @@ import ( "strings" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/event" + "github.com/88250/gulu" + "github.com/88250/wide/event" ) const ( @@ -240,7 +240,7 @@ func FixedTimeCheckEnv() { checkEnv() // check immediately go func() { - for _ = range time.Tick(time.Minute*7) { + for _ = range time.Tick(time.Minute * 7) { checkEnv() } }() diff --git a/editor/editors.go b/editor/editors.go index 771808d..28fb54d 100644 --- a/editor/editors.go +++ b/editor/editors.go @@ -27,11 +27,11 @@ import ( "strings" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/file" - "github.com/b3log/wide/session" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/file" + "github.com/88250/wide/session" + "github.com/88250/wide/util" "github.com/gorilla/websocket" ) diff --git a/editor/formatter.go b/editor/formatter.go index d7eedb4..795eaf9 100644 --- a/editor/formatter.go +++ b/editor/formatter.go @@ -20,9 +20,9 @@ import ( "os" "os/exec" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/session" ) // GoFmtHandler handles request of formatting Go source code. diff --git a/event/events.go b/event/events.go index 7b55048..1adf665 100644 --- a/event/events.go +++ b/event/events.go @@ -18,7 +18,7 @@ package event import ( "os" - "github.com/b3log/gulu" + "github.com/88250/gulu" ) const ( diff --git a/file/exporter.go b/file/exporter.go index fd2abdb..4fe5631 100644 --- a/file/exporter.go +++ b/file/exporter.go @@ -20,7 +20,7 @@ import ( "os" "path/filepath" - "github.com/b3log/gulu" + "github.com/88250/gulu" ) // GetZipHandler handles request of retrieving zip file. diff --git a/file/files.go b/file/files.go index 5efabec..8022be2 100644 --- a/file/files.go +++ b/file/files.go @@ -24,10 +24,10 @@ import ( "sort" "strings" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/event" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/event" + "github.com/88250/wide/session" ) // Logger. diff --git a/file/outline.go b/file/outline.go index bbe5f27..2f6a44b 100755 --- a/file/outline.go +++ b/file/outline.go @@ -23,7 +23,7 @@ import ( "net/http" "strings" - "github.com/b3log/gulu" + "github.com/88250/gulu" ) type element struct { diff --git a/go.mod b/go.mod index 24ff116..09cb68c 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ -module github.com/b3log/wide +module github.com/88250/wide go 1.12 require ( - github.com/b3log/gulu v0.0.0-20190806034141-2b1d1b33ff3d + github.com/88250/gulu v0.0.0-20191129115942-f593513f6ed6 github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2 // indirect github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 // indirect github.com/fsnotify/fsnotify v1.4.7 diff --git a/go.sum b/go.sum index 5c850cf..c4cc0ce 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/b3log/gulu v0.0.0-20190806034141-2b1d1b33ff3d h1:Ns7H97LVniGzx1DW2T0+eUtmuroZDo6nzjEj486w4+0= -github.com/b3log/gulu v0.0.0-20190806034141-2b1d1b33ff3d/go.mod h1:UmyB0pe8jv1K3dZy/4UE3uCpM8zYkB4nbiIgjemuQ7A= +github.com/88250/gulu v0.0.0-20191129115942-f593513f6ed6 h1:RZG7yVJ1ZIJAmx+cEUXs5R+saYRfnTWrVTGjflmI1zs= +github.com/88250/gulu v0.0.0-20191129115942-f593513f6ed6/go.mod h1:a2POIziN+QFeNT4Mj7FHH2lz1HEaFlMRF6wPE0NHM4U= github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2 h1:aZtFdDNWY/yH86JPR2WX/PN63635VsE/f/nXNPAbYxY= github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= diff --git a/i18n/locales.go b/i18n/locales.go index 4b5f6d5..d5a06bf 100644 --- a/i18n/locales.go +++ b/i18n/locales.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - "github.com/b3log/gulu" + "github.com/88250/gulu" ) // Logger. diff --git a/main.go b/main.go index 5790f3f..ab9ba09 100644 --- a/main.go +++ b/main.go @@ -29,16 +29,16 @@ import ( "syscall" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/editor" - "github.com/b3log/wide/event" - "github.com/b3log/wide/file" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/notification" - "github.com/b3log/wide/output" - "github.com/b3log/wide/playground" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/editor" + "github.com/88250/wide/event" + "github.com/88250/wide/file" + "github.com/88250/wide/i18n" + "github.com/88250/wide/notification" + "github.com/88250/wide/output" + "github.com/88250/wide/playground" + "github.com/88250/wide/session" ) // Logger diff --git a/notification/notifications.go b/notification/notifications.go index f8fb5aa..2acd52d 100644 --- a/notification/notifications.go +++ b/notification/notifications.go @@ -21,12 +21,12 @@ import ( "strconv" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/event" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/event" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" + "github.com/88250/wide/util" "github.com/gorilla/websocket" ) diff --git a/output/build.go b/output/build.go index 604e015..2b4ae7f 100644 --- a/output/build.go +++ b/output/build.go @@ -18,7 +18,6 @@ import ( "bufio" "encoding/json" "fmt" - "github.com/b3log/gulu" "io" "net/http" "os" @@ -28,9 +27,10 @@ import ( "strconv" "strings" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" ) // BuildHandler handles request of building. diff --git a/output/cross.go b/output/cross.go index f6aa0fb..b489ae5 100644 --- a/output/cross.go +++ b/output/cross.go @@ -26,10 +26,10 @@ import ( "strconv" "strings" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" ) // CrossCompilationHandler handles request of cross compilation. diff --git a/output/install.go b/output/install.go index c271458..a04db13 100644 --- a/output/install.go +++ b/output/install.go @@ -26,10 +26,10 @@ import ( "strconv" "strings" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" ) // GoInstallHandler handles request of go install. diff --git a/output/outputs.go b/output/outputs.go index c225f37..a1e7ba9 100644 --- a/output/outputs.go +++ b/output/outputs.go @@ -25,10 +25,10 @@ import ( "strings" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/session" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/session" + "github.com/88250/wide/util" "github.com/gorilla/websocket" ) diff --git a/output/run.go b/output/run.go index f7bc78b..cc5e782 100644 --- a/output/run.go +++ b/output/run.go @@ -15,7 +15,7 @@ package output import ( - "github.com/b3log/wide/session" + "github.com/88250/wide/session" "net/http" ) diff --git a/output/test.go b/output/test.go index 981b3bd..0d85153 100644 --- a/output/test.go +++ b/output/test.go @@ -24,10 +24,10 @@ import ( "os/exec" "path/filepath" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" ) // GoTestHandler handles request of go test. diff --git a/output/vet.go b/output/vet.go index 5bfa6bd..8929c7a 100644 --- a/output/vet.go +++ b/output/vet.go @@ -24,10 +24,10 @@ import ( "os/exec" "path/filepath" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" ) // GoVetHandler handles request of go vet. diff --git a/package.json b/package.json index 2204af9..1fbb9bd 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git://github.com/b3log/wide.git" }, "bugs": { - "url": "https://github.com/b3log/wide/issues" + "url": "https://github.com/88250/wide/issues" }, "license": "Apache License", "private": true, diff --git a/playground/autocomplete.go b/playground/autocomplete.go index 1fca636..7bb37ca 100644 --- a/playground/autocomplete.go +++ b/playground/autocomplete.go @@ -22,8 +22,8 @@ import ( "strconv" "strings" - "github.com/b3log/gulu" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/session" ) // AutocompleteHandler handles request of code autocompletion. diff --git a/playground/build.go b/playground/build.go index 780f589..2ac9652 100644 --- a/playground/build.go +++ b/playground/build.go @@ -22,9 +22,9 @@ import ( "path/filepath" "strings" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/session" ) // BuildHandler handles request of Playground building. diff --git a/playground/file.go b/playground/file.go index 1544431..30fff59 100644 --- a/playground/file.go +++ b/playground/file.go @@ -24,9 +24,9 @@ import ( "os/exec" "path/filepath" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/session" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/session" ) // SaveHandler handles request of Playground code save. diff --git a/playground/playgrounds.go b/playground/playgrounds.go index 4ee23d1..6035551 100644 --- a/playground/playgrounds.go +++ b/playground/playgrounds.go @@ -26,11 +26,11 @@ import ( "strings" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" - "github.com/b3log/wide/session" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" + "github.com/88250/wide/session" + "github.com/88250/wide/util" "github.com/gorilla/websocket" ) diff --git a/playground/run.go b/playground/run.go index 994f51d..d620c36 100644 --- a/playground/run.go +++ b/playground/run.go @@ -15,7 +15,7 @@ package playground import ( - "github.com/b3log/wide/session" + "github.com/88250/wide/session" "net/http" ) diff --git a/session/oauth.go b/session/oauth.go index 0e23601..498b436 100644 --- a/session/oauth.go +++ b/session/oauth.go @@ -25,9 +25,9 @@ import ( "strings" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" "github.com/parnurzeal/gorequest" ) @@ -59,7 +59,7 @@ func RedirectGitHubHandler(w http.ResponseWriter, r *http.Request) { referer := conf.Wide.Server + "__" + state state = gulu.Rand.String(16) + referer states[state] = state - path := loginAuthURL + "?client_id=" + clientId + "&state=" + state + "&scope=public_repo,read:user,user:follow" + path := loginAuthURL + "?client_id=" + clientId + "&state=" + state http.Redirect(w, r, path, http.StatusSeeOther) } diff --git a/session/processes.go b/session/processes.go index 9526ec1..8300a87 100644 --- a/session/processes.go +++ b/session/processes.go @@ -27,9 +27,9 @@ import ( "sync" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/util" ) // Type of process set. diff --git a/session/sessions.go b/session/sessions.go index 05adb49..6366d90 100644 --- a/session/sessions.go +++ b/session/sessions.go @@ -35,10 +35,10 @@ import ( "sync" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/event" - "github.com/b3log/wide/util" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/event" + "github.com/88250/wide/util" "github.com/fsnotify/fsnotify" "github.com/gorilla/sessions" "github.com/gorilla/websocket" diff --git a/session/users.go b/session/users.go index 32c9cf3..ed4323f 100644 --- a/session/users.go +++ b/session/users.go @@ -24,9 +24,9 @@ import ( "text/template" "time" - "github.com/b3log/gulu" - "github.com/b3log/wide/conf" - "github.com/b3log/wide/i18n" + "github.com/88250/gulu" + "github.com/88250/wide/conf" + "github.com/88250/wide/i18n" ) const ( diff --git a/views/about.html b/views/about.html index 737e61b..16346c6 100644 --- a/views/about.html +++ b/views/about.html @@ -45,7 +45,7 @@
- +
                                  Apache License
                            Version 2.0, January 2004
diff --git a/views/index.html b/views/index.html
index 4e0e92b..8e50343 100644
--- a/views/index.html
+++ b/views/index.html
@@ -302,7 +302,7 @@
                                 
                                 {{.i18n.wide_doc}}
                                                         
-                            
  • +
  • {{.i18n.issues}}
  • diff --git a/views/login.html b/views/login.html index 08840df..b6ec8ae 100644 --- a/views/login.html +++ b/views/login.html @@ -39,15 +39,6 @@ -
    - -