diff --git a/README.md b/README.md index f98772c..c86fee8 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,41 @@ -# [Wide](https://github.com/b3log/wide) [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Go Report Card](https://goreportcard.com/badge/github.com/b3log/wide)](https://goreportcard.com/report/github.com/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](https://img.shields.io/badge/license-apache2-orange.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/b3log/wide) [![Download](https://img.shields.io/badge/download-~4.3K-red.svg?style=flat)](https://pan.baidu.com/s/1dD3XwOT) - -先试试我们搭建好的[在线服务](https://wide.b3log.org),你可以在这里[下载](https://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧! +

+Wide +

+一款基于 Web 的 Go 语言 IDE +

+ + + + + +
+ + + + + + +

+   +   +   + +

## 简介 -Wide 是一个基于 **W**eb 的 Go 语言 **IDE**。 - -![](https://cloud.githubusercontent.com/assets/873584/4606377/d0ca3c2a-521b-11e4-912c-d955ab05850b.png) +Wide 是一款基于 **W**eb 的 Go 语言 **IDE**。 ## 动机 目前较为流行的 Go IDE 都有一些缺陷或遗憾: + * 文本编辑器类(vim/emacs/sublime/Atom 等):对于新手门槛太高,搭建复杂 * 插件类(goclipse、IDEA 等):需要原 IDE 支持,不够专业 * LiteIDE 界面不够 modern、goland 收费 * **缺少网络分享、嵌入网站可运行功能** -另外,Go IDE 很少,用 Go 本身开发的 IDE 更是没有,这是一个很好的尝试。关于产品定位的讨论请看[这里](https://hacpai.com/article/1438407961481)。 +另外,Go IDE 很少,用 Go 本身开发的 IDE 更是没有,这是一次很好的尝试。关于产品定位的讨论请看[这里](https://hacpai.com/article/1438407961481)。 ## 特性 @@ -133,4 +152,9 @@ Wide 使用 [Apache License, Version 2](https://www.apache.org/licenses/LICENSE- ---- - +## 开源项目推荐 + +* 如果你需要搭建一个个人博客系统,可以考虑使用 [Solo](https://github.com/b3log/solo) +* 如果你需要搭建一个多用户博客平台,可以考虑使用 [Pipe](https://github.com/b3log/pipe) +* 如果你需要搭建一个社区平台,可以考虑使用 [Sym](https://github.com/b3log/symphony) +* 欢迎加入我们的小众开源社区,详情请看[这里](https://hacpai.com/article/1463025124998) diff --git a/session/oauthctl.go b/session/oauthctl.go index 47eadde..37997ba 100644 --- a/session/oauthctl.go +++ b/session/oauthctl.go @@ -66,15 +66,10 @@ func RedirectGitHubHandler(w http.ResponseWriter, r *http.Request) { state := util.Rand.String(16) + referer states[state] = state path := loginAuthURL + "?client_id=" + clientId + "&state=" + state + "&scope=public_repo,read:user,user:follow" - - logger.Infof("redirect to github [" + path + "]") - http.Redirect(w, r, path, http.StatusSeeOther) } func GithubCallbackHandler(w http.ResponseWriter, r *http.Request) { - logger.Infof("Github callback [" + r.URL.String() + "]") - state := r.URL.Query().Get("state") if _, exist := states[state]; !exist { http.Error(w, "Get state param failed", http.StatusBadRequest) @@ -121,7 +116,7 @@ func GithubCallbackHandler(w http.ResponseWriter, r *http.Request) { httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge httpSession.Save(r, w) - logger.Debugf("Created a HTTP session [%s] for user [%s]", httpSession.Values["id"].(string), githubId) + http.Redirect(w, r, "/", http.StatusSeeOther) } // GitHubUserInfo returns GitHub user info specified by the given access token.