Merge pull request #142 from 0xbaadf00d/feature/gofmt

Normalize files with gofmt
This commit is contained in:
Thomas Boerger 2016-11-11 14:44:30 +01:00 committed by GitHub
commit 5fc370e332
15 changed files with 26 additions and 26 deletions

View file

@ -16,13 +16,13 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/Unknwon/com" "code.gitea.io/git"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template/highlight" "code.gitea.io/gitea/modules/template/highlight"
"code.gitea.io/git" "github.com/Unknwon/com"
"github.com/sergi/go-diff/diffmatchpatch" "github.com/sergi/go-diff/diffmatchpatch"
"golang.org/x/net/html/charset" "golang.org/x/net/html/charset"
"golang.org/x/text/transform" "golang.org/x/text/transform"

View file

@ -14,9 +14,9 @@ import (
"strings" "strings"
"time" "time"
api "code.gitea.io/sdk/gitea"
"github.com/Unknwon/com" "github.com/Unknwon/com"
"github.com/go-xorm/xorm" "github.com/go-xorm/xorm"
api "code.gitea.io/sdk/gitea"
gouuid "github.com/satori/go.uuid" gouuid "github.com/satori/go.uuid"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"

View file

@ -11,14 +11,14 @@ import (
"strings" "strings"
"time" "time"
"github.com/Unknwon/com" "code.gitea.io/git"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/sync" "code.gitea.io/gitea/modules/sync"
"github.com/go-xorm/xorm"
"code.gitea.io/git"
api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
) )
var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength) var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)

View file

@ -19,17 +19,17 @@ import (
"strings" "strings"
"time" "time"
"github.com/Unknwon/cae/zip" "code.gitea.io/git"
"github.com/Unknwon/com"
"code.gitea.io/gitea/modules/bindata" "code.gitea.io/gitea/modules/bindata"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markdown" "code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/sync" "code.gitea.io/gitea/modules/sync"
"github.com/go-xorm/xorm"
"code.gitea.io/git"
api "code.gitea.io/sdk/gitea" api "code.gitea.io/sdk/gitea"
"github.com/Unknwon/cae/zip"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
version "github.com/mcuadros/go-version" version "github.com/mcuadros/go-version"
ini "gopkg.in/ini.v1" ini "gopkg.in/ini.v1"
) )

View file

@ -8,8 +8,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/Unknwon/com"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"github.com/Unknwon/com"
"github.com/go-macaron/binding" "github.com/go-macaron/binding"
macaron "gopkg.in/macaron.v1" macaron "gopkg.in/macaron.v1"
) )

View file

@ -22,10 +22,10 @@ import (
"unicode" "unicode"
"unicode/utf8" "unicode/utf8"
"github.com/Unknwon/com"
"github.com/Unknwon/i18n"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
"github.com/Unknwon/i18n"
"github.com/gogits/chardet" "github.com/gogits/chardet"
) )

View file

@ -8,10 +8,10 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/Unknwon/paginater"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/paginater"
macaron "gopkg.in/macaron.v1" macaron "gopkg.in/macaron.v1"
) )

View file

@ -10,11 +10,11 @@ import (
"path" "path"
"strings" "strings"
"github.com/Unknwon/com" "code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/git" "github.com/Unknwon/com"
editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1" editorconfig "gopkg.in/editorconfig/editorconfig-core-go.v1"
macaron "gopkg.in/macaron.v1" macaron "gopkg.in/macaron.v1"
) )

View file

@ -8,12 +8,12 @@ import (
"container/list" "container/list"
"path" "path"
"github.com/Unknwon/paginater"
"code.gitea.io/git" "code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/paginater"
) )
const ( const (

View file

@ -11,6 +11,7 @@ import (
"path" "path"
"strings" "strings"
"code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
@ -18,7 +19,6 @@ import (
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template" "code.gitea.io/gitea/modules/template"
"code.gitea.io/git"
) )
const ( const (

View file

@ -3,9 +3,9 @@ package repo
import ( import (
"fmt" "fmt"
"code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/git"
) )
func SetEditorconfigIfExists(ctx *context.Context) { func SetEditorconfigIfExists(ctx *context.Context) {

View file

@ -10,14 +10,14 @@ import (
"path" "path"
"strings" "strings"
"github.com/Unknwon/com" "code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/git" "github.com/Unknwon/com"
) )
const ( const (

View file

@ -7,13 +7,13 @@ package repo
import ( import (
"fmt" "fmt"
"github.com/Unknwon/paginater"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markdown" "code.gitea.io/gitea/modules/markdown"
"github.com/Unknwon/paginater"
) )
const ( const (

View file

@ -12,7 +12,7 @@ import (
"path" "path"
"strings" "strings"
"github.com/Unknwon/paginater" "code.gitea.io/git"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
@ -21,7 +21,7 @@ import (
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template" "code.gitea.io/gitea/modules/template"
"code.gitea.io/gitea/modules/template/highlight" "code.gitea.io/gitea/modules/template/highlight"
"code.gitea.io/git" "github.com/Unknwon/paginater"
) )
const ( const (

View file

@ -130,8 +130,8 @@ func SignInPost(ctx *context.Context, form auth.SignInForm) {
// Register last login // Register last login
u.SetLastLogin() u.SetLastLogin()
if err := models.UpdateUser(u); err != nil { if err := models.UpdateUser(u); err != nil {
ctx.Handle(500, "UpdateUser", err) ctx.Handle(500, "UpdateUser", err)
return return
} }
if redirectTo, _ := url.QueryUnescape(ctx.GetCookie("redirect_to")); len(redirectTo) > 0 { if redirectTo, _ := url.QueryUnescape(ctx.GetCookie("redirect_to")); len(redirectTo) > 0 {