Browse Source

Fix formatting

pull/2439/head
Faraz Fazli 9 years ago
parent
commit
0139881b00
  1. 8
      cmd/dump.go
  2. 2
      cmd/web.go
  3. 50
      models/git_diff_test.go
  4. 2
      models/wiki.go
  5. 671
      modules/bindata/bindata.go
  6. 2
      routers/repo/view.go

8
cmd/dump.go

@ -68,21 +68,21 @@ func runDump(ctx *cli.Context) {
log.Fatalf("Fail to create %s: %v", fileName, err)
}
if err := z.AddFile("gogs-repo.zip", reposDump); err !=nil {
if err := z.AddFile("gogs-repo.zip", reposDump); err != nil {
log.Fatalf("Fail to include gogs-repo.zip: %v", err)
}
if err := z.AddFile("gogs-db.sql", dbDump); err !=nil {
if err := z.AddFile("gogs-db.sql", dbDump); err != nil {
log.Fatalf("Fail to include gogs-db.sql: %v", err)
}
customDir, err := os.Stat(setting.CustomPath)
if err == nil && customDir.IsDir() {
if err := z.AddDir("custom", setting.CustomPath); err !=nil {
if err := z.AddDir("custom", setting.CustomPath); err != nil {
log.Fatalf("Fail to include custom: %v", err)
}
} else {
log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath)
}
if err := z.AddDir("log", setting.LogRootPath); err !=nil {
if err := z.AddDir("log", setting.LogRootPath); err != nil {
log.Fatalf("Fail to include log: %v", err)
}
// FIXME: SSH key file.

2
cmd/web.go

@ -165,7 +165,7 @@ func newMacaron() *macaron.Macaron {
}))
m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{
&toolbox.HealthCheckFuncDesc{
{
Desc: "Database connection",
Func: models.Ping,
},

50
models/git_diff_test.go

@ -20,40 +20,40 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) {
func TestDiffToHTML(t *testing.T) {
assertEqual(t, "foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffInsert, "bar"},
dmp.Diff{dmp.DiffDelete, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"},
{dmp.DiffEqual, "foo "},
{dmp.DiffInsert, "bar"},
{dmp.DiffDelete, " baz"},
{dmp.DiffEqual, " biz"},
}, DIFF_LINE_ADD))
assertEqual(t, "foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffDelete, "bar"},
dmp.Diff{dmp.DiffInsert, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"},
{dmp.DiffEqual, "foo "},
{dmp.DiffDelete, "bar"},
{dmp.DiffInsert, " baz"},
{dmp.DiffEqual, " biz"},
}, DIFF_LINE_DEL))
}
// test if GetLine is return the correct lines
func TestGetLine(t *testing.T) {
ds := DiffSection{Lines: []*DiffLine{
&DiffLine{LeftIdx: 28, RightIdx: 28, Type: DIFF_LINE_PLAIN},
&DiffLine{LeftIdx: 29, RightIdx: 29, Type: DIFF_LINE_PLAIN},
&DiffLine{LeftIdx: 30, RightIdx: 30, Type: DIFF_LINE_PLAIN},
&DiffLine{LeftIdx: 31, RightIdx: 0, Type: DIFF_LINE_DEL},
&DiffLine{LeftIdx: 0, RightIdx: 31, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 0, RightIdx: 32, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 32, RightIdx: 33, Type: DIFF_LINE_PLAIN},
&DiffLine{LeftIdx: 33, RightIdx: 0, Type: DIFF_LINE_DEL},
&DiffLine{LeftIdx: 34, RightIdx: 0, Type: DIFF_LINE_DEL},
&DiffLine{LeftIdx: 35, RightIdx: 0, Type: DIFF_LINE_DEL},
&DiffLine{LeftIdx: 36, RightIdx: 0, Type: DIFF_LINE_DEL},
&DiffLine{LeftIdx: 0, RightIdx: 34, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 0, RightIdx: 35, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 0, RightIdx: 36, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 0, RightIdx: 37, Type: DIFF_LINE_ADD},
&DiffLine{LeftIdx: 37, RightIdx: 38, Type: DIFF_LINE_PLAIN},
&DiffLine{LeftIdx: 38, RightIdx: 39, Type: DIFF_LINE_PLAIN},
{LeftIdx: 28, RightIdx: 28, Type: DIFF_LINE_PLAIN},
{LeftIdx: 29, RightIdx: 29, Type: DIFF_LINE_PLAIN},
{LeftIdx: 30, RightIdx: 30, Type: DIFF_LINE_PLAIN},
{LeftIdx: 31, RightIdx: 0, Type: DIFF_LINE_DEL},
{LeftIdx: 0, RightIdx: 31, Type: DIFF_LINE_ADD},
{LeftIdx: 0, RightIdx: 32, Type: DIFF_LINE_ADD},
{LeftIdx: 32, RightIdx: 33, Type: DIFF_LINE_PLAIN},
{LeftIdx: 33, RightIdx: 0, Type: DIFF_LINE_DEL},
{LeftIdx: 34, RightIdx: 0, Type: DIFF_LINE_DEL},
{LeftIdx: 35, RightIdx: 0, Type: DIFF_LINE_DEL},
{LeftIdx: 36, RightIdx: 0, Type: DIFF_LINE_DEL},
{LeftIdx: 0, RightIdx: 34, Type: DIFF_LINE_ADD},
{LeftIdx: 0, RightIdx: 35, Type: DIFF_LINE_ADD},
{LeftIdx: 0, RightIdx: 36, Type: DIFF_LINE_ADD},
{LeftIdx: 0, RightIdx: 37, Type: DIFF_LINE_ADD},
{LeftIdx: 37, RightIdx: 38, Type: DIFF_LINE_PLAIN},
{LeftIdx: 38, RightIdx: 39, Type: DIFF_LINE_PLAIN},
}}
assertLineEqual(t, ds.GetLine(DIFF_LINE_ADD, 31), ds.Lines[4])

2
models/wiki.go

@ -7,12 +7,12 @@ package models
import (
"fmt"
"io/ioutil"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"sync"
"net/url"
"github.com/Unknwon/com"

671
modules/bindata/bindata.go

@ -224,11 +224,11 @@ import (
"compress/gzip"
"fmt"
"io"
"strings"
"os"
"time"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
func bindataRead(data []byte, name string) ([]byte, error) {
@ -4601,7 +4601,7 @@ func Asset(name string) ([]byte, error) {
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if (err != nil) {
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
@ -4890,445 +4890,231 @@ type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
"conf": &bintree{nil, map[string]*bintree{
"app.ini": &bintree{confAppIni, map[string]*bintree{
}},
"gitignore": &bintree{nil, map[string]*bintree{
"Actionscript": &bintree{confGitignoreActionscript, map[string]*bintree{
}},
"Ada": &bintree{confGitignoreAda, map[string]*bintree{
}},
"Agda": &bintree{confGitignoreAgda, map[string]*bintree{
}},
"Android": &bintree{confGitignoreAndroid, map[string]*bintree{
}},
"Anjuta": &bintree{confGitignoreAnjuta, map[string]*bintree{
}},
"AppEngine": &bintree{confGitignoreAppengine, map[string]*bintree{
}},
"AppceleratorTitanium": &bintree{confGitignoreAppceleratortitanium, map[string]*bintree{
}},
"ArchLinuxPackages": &bintree{confGitignoreArchlinuxpackages, map[string]*bintree{
}},
"Archives": &bintree{confGitignoreArchives, map[string]*bintree{
}},
"Autotools": &bintree{confGitignoreAutotools, map[string]*bintree{
}},
"BricxCC": &bintree{confGitignoreBricxcc, map[string]*bintree{
}},
"C": &bintree{confGitignoreC, map[string]*bintree{
}},
"C Sharp": &bintree{confGitignoreCSharp, map[string]*bintree{
}},
"C++": &bintree{confGitignoreC2, map[string]*bintree{
}},
"CFWheels": &bintree{confGitignoreCfwheels, map[string]*bintree{
}},
"CMake": &bintree{confGitignoreCmake, map[string]*bintree{
}},
"CUDA": &bintree{confGitignoreCuda, map[string]*bintree{
}},
"CVS": &bintree{confGitignoreCvs, map[string]*bintree{
}},
"CakePHP": &bintree{confGitignoreCakephp, map[string]*bintree{
}},
"ChefCookbook": &bintree{confGitignoreChefcookbook, map[string]*bintree{
}},
"Cloud9": &bintree{confGitignoreCloud9, map[string]*bintree{
}},
"CodeIgniter": &bintree{confGitignoreCodeigniter, map[string]*bintree{
}},
"CodeKit": &bintree{confGitignoreCodekit, map[string]*bintree{
}},
"CommonLisp": &bintree{confGitignoreCommonlisp, map[string]*bintree{
}},
"Composer": &bintree{confGitignoreComposer, map[string]*bintree{
}},
"Concrete5": &bintree{confGitignoreConcrete5, map[string]*bintree{
}},
"Coq": &bintree{confGitignoreCoq, map[string]*bintree{
}},
"CraftCMS": &bintree{confGitignoreCraftcms, map[string]*bintree{
}},
"DM": &bintree{confGitignoreDm, map[string]*bintree{
}},
"Dart": &bintree{confGitignoreDart, map[string]*bintree{
}},
"DartEditor": &bintree{confGitignoreDarteditor, map[string]*bintree{
}},
"Delphi": &bintree{confGitignoreDelphi, map[string]*bintree{
}},
"Dreamweaver": &bintree{confGitignoreDreamweaver, map[string]*bintree{
}},
"Drupal": &bintree{confGitignoreDrupal, map[string]*bintree{
}},
"EPiServer": &bintree{confGitignoreEpiserver, map[string]*bintree{
}},
"Eagle": &bintree{confGitignoreEagle, map[string]*bintree{
}},
"Eclipse": &bintree{confGitignoreEclipse, map[string]*bintree{
}},
"EiffelStudio": &bintree{confGitignoreEiffelstudio, map[string]*bintree{
}},
"Elisp": &bintree{confGitignoreElisp, map[string]*bintree{
}},
"Elixir": &bintree{confGitignoreElixir, map[string]*bintree{
}},
"Emacs": &bintree{confGitignoreEmacs, map[string]*bintree{
}},
"Ensime": &bintree{confGitignoreEnsime, map[string]*bintree{
}},
"Erlang": &bintree{confGitignoreErlang, map[string]*bintree{
}},
"Espresso": &bintree{confGitignoreEspresso, map[string]*bintree{
}},
"ExpressionEngine": &bintree{confGitignoreExpressionengine, map[string]*bintree{
}},
"ExtJs": &bintree{confGitignoreExtjs, map[string]*bintree{
}},
"Fancy": &bintree{confGitignoreFancy, map[string]*bintree{
}},
"Finale": &bintree{confGitignoreFinale, map[string]*bintree{
}},
"FlexBuilder": &bintree{confGitignoreFlexbuilder, map[string]*bintree{
}},
"ForceDotCom": &bintree{confGitignoreForcedotcom, map[string]*bintree{
}},
"FuelPHP": &bintree{confGitignoreFuelphp, map[string]*bintree{
}},
"GWT": &bintree{confGitignoreGwt, map[string]*bintree{
}},
"Gcov": &bintree{confGitignoreGcov, map[string]*bintree{
}},
"GitBook": &bintree{confGitignoreGitbook, map[string]*bintree{
}},
"Go": &bintree{confGitignoreGo, map[string]*bintree{
}},
"Gradle": &bintree{confGitignoreGradle, map[string]*bintree{
}},
"Grails": &bintree{confGitignoreGrails, map[string]*bintree{
}},
"Haskell": &bintree{confGitignoreHaskell, map[string]*bintree{
}},
"IGORPro": &bintree{confGitignoreIgorpro, map[string]*bintree{
}},
"IPythonNotebook": &bintree{confGitignoreIpythonnotebook, map[string]*bintree{
}},
"Idris": &bintree{confGitignoreIdris, map[string]*bintree{
}},
"JDeveloper": &bintree{confGitignoreJdeveloper, map[string]*bintree{
}},
"Java": &bintree{confGitignoreJava, map[string]*bintree{
}},
"Jboss": &bintree{confGitignoreJboss, map[string]*bintree{
}},
"Jekyll": &bintree{confGitignoreJekyll, map[string]*bintree{
}},
"JetBrains": &bintree{confGitignoreJetbrains, map[string]*bintree{
}},
"Joomla": &bintree{confGitignoreJoomla, map[string]*bintree{
}},
"KDevelop4": &bintree{confGitignoreKdevelop4, map[string]*bintree{
}},
"Kate": &bintree{confGitignoreKate, map[string]*bintree{
}},
"KiCAD": &bintree{confGitignoreKicad, map[string]*bintree{
}},
"Kohana": &bintree{confGitignoreKohana, map[string]*bintree{
}},
"LabVIEW": &bintree{confGitignoreLabview, map[string]*bintree{
}},
"Laravel": &bintree{confGitignoreLaravel, map[string]*bintree{
}},
"Lazarus": &bintree{confGitignoreLazarus, map[string]*bintree{
}},
"Leiningen": &bintree{confGitignoreLeiningen, map[string]*bintree{
}},
"LemonStand": &bintree{confGitignoreLemonstand, map[string]*bintree{
}},
"LibreOffice": &bintree{confGitignoreLibreoffice, map[string]*bintree{
}},
"Lilypond": &bintree{confGitignoreLilypond, map[string]*bintree{
}},
"Linux": &bintree{confGitignoreLinux, map[string]*bintree{
}},
"Lithium": &bintree{confGitignoreLithium, map[string]*bintree{
}},
"Lua": &bintree{confGitignoreLua, map[string]*bintree{
}},
"LyX": &bintree{confGitignoreLyx, map[string]*bintree{
}},
"Magento": &bintree{confGitignoreMagento, map[string]*bintree{
}},
"Matlab": &bintree{confGitignoreMatlab, map[string]*bintree{
}},
"Maven": &bintree{confGitignoreMaven, map[string]*bintree{
}},
"Mercurial": &bintree{confGitignoreMercurial, map[string]*bintree{
}},
"Mercury": &bintree{confGitignoreMercury, map[string]*bintree{
}},
"MetaProgrammingSystem": &bintree{confGitignoreMetaprogrammingsystem, map[string]*bintree{
}},
"MicrosoftOffice": &bintree{confGitignoreMicrosoftoffice, map[string]*bintree{
}},
"ModelSim": &bintree{confGitignoreModelsim, map[string]*bintree{
}},
"Momentics": &bintree{confGitignoreMomentics, map[string]*bintree{
}},
"MonoDevelop": &bintree{confGitignoreMonodevelop, map[string]*bintree{
}},
"Nanoc": &bintree{confGitignoreNanoc, map[string]*bintree{
}},
"NetBeans": &bintree{confGitignoreNetbeans, map[string]*bintree{
}},
"Nim": &bintree{confGitignoreNim, map[string]*bintree{
}},
"Ninja": &bintree{confGitignoreNinja, map[string]*bintree{
}},
"Node": &bintree{confGitignoreNode, map[string]*bintree{
}},
"NotepadPP": &bintree{confGitignoreNotepadpp, map[string]*bintree{
}},
"OCaml": &bintree{confGitignoreOcaml, map[string]*bintree{
}},
"OSX": &bintree{confGitignoreOsx, map[string]*bintree{
}},
"Objective-C": &bintree{confGitignoreObjectiveC, map[string]*bintree{
}},
"Opa": &bintree{confGitignoreOpa, map[string]*bintree{
}},
"OpenCart": &bintree{confGitignoreOpencart, map[string]*bintree{
}},
"OracleForms": &bintree{confGitignoreOracleforms, map[string]*bintree{
}},
"Packer": &bintree{confGitignorePacker, map[string]*bintree{
}},
"Perl": &bintree{confGitignorePerl, map[string]*bintree{
}},
"Phalcon": &bintree{confGitignorePhalcon, map[string]*bintree{
}},
"PlayFramework": &bintree{confGitignorePlayframework, map[string]*bintree{
}},
"Plone": &bintree{confGitignorePlone, map[string]*bintree{
}},
"Prestashop": &bintree{confGitignorePrestashop, map[string]*bintree{
}},
"Processing": &bintree{confGitignoreProcessing, map[string]*bintree{
}},
"Python": &bintree{confGitignorePython, map[string]*bintree{
}},
"Qooxdoo": &bintree{confGitignoreQooxdoo, map[string]*bintree{
}},
"Qt": &bintree{confGitignoreQt, map[string]*bintree{
}},
"R": &bintree{confGitignoreR, map[string]*bintree{
}},
"ROS": &bintree{confGitignoreRos, map[string]*bintree{
}},
"Rails": &bintree{confGitignoreRails, map[string]*bintree{
}},
"Redcar": &bintree{confGitignoreRedcar, map[string]*bintree{
}},
"Redis": &bintree{confGitignoreRedis, map[string]*bintree{
}},
"RhodesRhomobile": &bintree{confGitignoreRhodesrhomobile, map[string]*bintree{
}},
"Ruby": &bintree{confGitignoreRuby, map[string]*bintree{
}},
"Rust": &bintree{confGitignoreRust, map[string]*bintree{
}},
"SBT": &bintree{confGitignoreSbt, map[string]*bintree{
}},
"SCons": &bintree{confGitignoreScons, map[string]*bintree{
}},
"SVN": &bintree{confGitignoreSvn, map[string]*bintree{
}},
"Sass": &bintree{confGitignoreSass, map[string]*bintree{
}},
"Scala": &bintree{confGitignoreScala, map[string]*bintree{
}},
"Scrivener": &bintree{confGitignoreScrivener, map[string]*bintree{
}},
"Sdcc": &bintree{confGitignoreSdcc, map[string]*bintree{
}},
"SeamGen": &bintree{confGitignoreSeamgen, map[string]*bintree{
}},
"SketchUp": &bintree{confGitignoreSketchup, map[string]*bintree{
}},
"SlickEdit": &bintree{confGitignoreSlickedit, map[string]*bintree{
}},
"Stella": &bintree{confGitignoreStella, map[string]*bintree{
}},
"SublimeText": &bintree{confGitignoreSublimetext, map[string]*bintree{
}},
"SugarCRM": &bintree{confGitignoreSugarcrm, map[string]*bintree{
}},
"Swift": &bintree{confGitignoreSwift, map[string]*bintree{
}},
"Symfony": &bintree{confGitignoreSymfony, map[string]*bintree{
}},
"SymphonyCMS": &bintree{confGitignoreSymphonycms, map[string]*bintree{
}},
"SynopsysVCS": &bintree{confGitignoreSynopsysvcs, map[string]*bintree{
}},
"Tags": &bintree{confGitignoreTags, map[string]*bintree{
}},
"TeX": &bintree{confGitignoreTex, map[string]*bintree{
}},
"TextMate": &bintree{confGitignoreTextmate, map[string]*bintree{
}},
"Textpattern": &bintree{confGitignoreTextpattern, map[string]*bintree{
}},
"TortoiseGit": &bintree{confGitignoreTortoisegit, map[string]*bintree{
}},
"TurboGears2": &bintree{confGitignoreTurbogears2, map[string]*bintree{
}},
"Typo3": &bintree{confGitignoreTypo3, map[string]*bintree{
}},
"Umbraco": &bintree{confGitignoreUmbraco, map[string]*bintree{
}},
"Unity": &bintree{confGitignoreUnity, map[string]*bintree{
}},
"VVVV": &bintree{confGitignoreVvvv, map[string]*bintree{
}},
"Vagrant": &bintree{confGitignoreVagrant, map[string]*bintree{
}},
"Vim": &bintree{confGitignoreVim, map[string]*bintree{
}},
"VirtualEnv": &bintree{confGitignoreVirtualenv, map[string]*bintree{
}},
"VisualStudio": &bintree{confGitignoreVisualstudio, map[string]*bintree{
}},
"VisualStudioCode": &bintree{confGitignoreVisualstudiocode, map[string]*bintree{
}},
"Waf": &bintree{confGitignoreWaf, map[string]*bintree{
}},
"WebMethods": &bintree{confGitignoreWebmethods, map[string]*bintree{
}},
"Windows": &bintree{confGitignoreWindows, map[string]*bintree{
}},
"WordPress": &bintree{confGitignoreWordpress, map[string]*bintree{
}},
"Xcode": &bintree{confGitignoreXcode, map[string]*bintree{
}},
"XilinxISE": &bintree{confGitignoreXilinxise, map[string]*bintree{
}},
"Xojo": &bintree{confGitignoreXojo, map[string]*bintree{
}},
"Yeoman": &bintree{confGitignoreYeoman, map[string]*bintree{
}},
"Yii": &bintree{confGitignoreYii, map[string]*bintree{
}},
"ZendFramework": &bintree{confGitignoreZendframework, map[string]*bintree{
}},
"Zephir": &bintree{confGitignoreZephir, map[string]*bintree{
}},
}},
"license": &bintree{nil, map[string]*bintree{
"Abstyles License": &bintree{confLicenseAbstylesLicense, map[string]*bintree{
}},
"Academic Free License v1.1": &bintree{confLicenseAcademicFreeLicenseV11, map[string]*bintree{
}},
"Academic Free License v1.2": &bintree{confLicenseAcademicFreeLicenseV12, map[string]*bintree{
}},
"Academic Free License v2.0": &bintree{confLicenseAcademicFreeLicenseV20, map[string]*bintree{
}},
"Academic Free License v2.1": &bintree{confLicenseAcademicFreeLicenseV21, map[string]*bintree{
}},
"Academic Free License v3.0": &bintree{confLicenseAcademicFreeLicenseV30, map[string]*bintree{
}},
"Affero General Public License v1.0": &bintree{confLicenseAfferoGeneralPublicLicenseV10, map[string]*bintree{
}},
"Apache License 1.0": &bintree{confLicenseApacheLicense10, map[string]*bintree{
}},
"Apache License 1.1": &bintree{confLicenseApacheLicense11, map[string]*bintree{
}},
"Apache License 2.0": &bintree{confLicenseApacheLicense20, map[string]*bintree{
}},
"Artistic License 1.0": &bintree{confLicenseArtisticLicense10, map[string]*bintree{
}},
"Artistic License 2.0": &bintree{confLicenseArtisticLicense20, map[string]*bintree{
}},
"BSD 2-clause License": &bintree{confLicenseBsd2ClauseLicense, map[string]*bintree{
}},
"BSD 3-clause License": &bintree{confLicenseBsd3ClauseLicense, map[string]*bintree{
}},
"BSD 4-clause License": &bintree{confLicenseBsd4ClauseLicense, map[string]*bintree{
}},
"Creative Commons CC0 1.0 Universal": &bintree{confLicenseCreativeCommonsCc010Universal, map[string]*bintree{
}},
"Eclipse Public License 1.0": &bintree{confLicenseEclipsePublicLicense10, map[string]*bintree{
}},
"Educational Community License v1.0": &bintree{confLicenseEducationalCommunityLicenseV10, map[string]*bintree{
}},
"Educational Community License v2.0": &bintree{confLicenseEducationalCommunityLicenseV20, map[string]*bintree{
}},
"GNU Affero General Public License v3.0": &bintree{confLicenseGnuAfferoGeneralPublicLicenseV30, map[string]*bintree{
}},
"GNU Free Documentation License v1.1": &bintree{confLicenseGnuFreeDocumentationLicenseV11, map[string]*bintree{
}},
"GNU Free Documentation License v1.2": &bintree{confLicenseGnuFreeDocumentationLicenseV12, map[string]*bintree{
}},
"GNU Free Documentation License v1.3": &bintree{confLicenseGnuFreeDocumentationLicenseV13, map[string]*bintree{
}},
"GNU General Public License v1.0": &bintree{confLicenseGnuGeneralPublicLicenseV10, map[string]*bintree{
}},
"GNU General Public License v2.0": &bintree{confLicenseGnuGeneralPublicLicenseV20, map[string]*bintree{
}},
"GNU General Public License v3.0": &bintree{confLicenseGnuGeneralPublicLicenseV30, map[string]*bintree{
}},
"GNU Lesser General Public License v2.1": &bintree{confLicenseGnuLesserGeneralPublicLicenseV21, map[string]*bintree{
}},
"GNU Lesser General Public License v3.0": &bintree{confLicenseGnuLesserGeneralPublicLicenseV30, map[string]*bintree{
}},
"GNU Library General Public License v2.0": &bintree{confLicenseGnuLibraryGeneralPublicLicenseV20, map[string]*bintree{
}},
"ISC license": &bintree{confLicenseIscLicense, map[string]*bintree{
}},
"MIT License": &bintree{confLicenseMitLicense, map[string]*bintree{
}},
"Mozilla Public License 1.0": &bintree{confLicenseMozillaPublicLicense10, map[string]*bintree{
}},
"Mozilla Public License 1.1": &bintree{confLicenseMozillaPublicLicense11, map[string]*bintree{
}},
"Mozilla Public License 2.0": &bintree{confLicenseMozillaPublicLicense20, map[string]*bintree{
}},
}},
"locale": &bintree{nil, map[string]*bintree{
"locale_bg-BG.ini": &bintree{confLocaleLocale_bgBgIni, map[string]*bintree{
}},
"locale_de-DE.ini": &bintree{confLocaleLocale_deDeIni, map[string]*bintree{
}},
"locale_en-US.ini": &bintree{confLocaleLocale_enUsIni, map[string]*bintree{
}},
"locale_es-ES.ini": &bintree{confLocaleLocale_esEsIni, map[string]*bintree{
}},
"locale_fr-FR.ini": &bintree{confLocaleLocale_frFrIni, map[string]*bintree{
}},
"locale_it-IT.ini": &bintree{confLocaleLocale_itItIni, map[string]*bintree{
}},
"locale_ja-JP.ini": &bintree{confLocaleLocale_jaJpIni, map[string]*bintree{
}},
"locale_lv-LV.ini": &bintree{confLocaleLocale_lvLvIni, map[string]*bintree{
}},
"locale_nl-NL.ini": &bintree{confLocaleLocale_nlNlIni, map[string]*bintree{
}},
"locale_pl-PL.ini": &bintree{confLocaleLocale_plPlIni, map[string]*bintree{
}},
"locale_pt-BR.ini": &bintree{confLocaleLocale_ptBrIni, map[string]*bintree{
}},
"locale_ru-RU.ini": &bintree{confLocaleLocale_ruRuIni, map[string]*bintree{
}},
"locale_zh-CN.ini": &bintree{confLocaleLocale_zhCnIni, map[string]*bintree{
}},
"locale_zh-HK.ini": &bintree{confLocaleLocale_zhHkIni, map[string]*bintree{
}},
}},
"readme": &bintree{nil, map[string]*bintree{
"Default": &bintree{confReadmeDefault, map[string]*bintree{
}},
"conf": {nil, map[string]*bintree{
"app.ini": {confAppIni, map[string]*bintree{}},
"gitignore": {nil, map[string]*bintree{
"Actionscript": {confGitignoreActionscript, map[string]*bintree{}},
"Ada": {confGitignoreAda, map[string]*bintree{}},
"Agda": {confGitignoreAgda, map[string]*bintree{}},
"Android": {confGitignoreAndroid, map[string]*bintree{}},
"Anjuta": {confGitignoreAnjuta, map[string]*bintree{}},
"AppEngine": {confGitignoreAppengine, map[string]*bintree{}},
"AppceleratorTitanium": {confGitignoreAppceleratortitanium, map[string]*bintree{}},
"ArchLinuxPackages": {confGitignoreArchlinuxpackages, map[string]*bintree{}},
"Archives": {confGitignoreArchives, map[string]*bintree{}},
"Autotools": {confGitignoreAutotools, map[string]*bintree{}},
"BricxCC": {confGitignoreBricxcc, map[string]*bintree{}},
"C": {confGitignoreC, map[string]*bintree{}},
"C Sharp": {confGitignoreCSharp, map[string]*bintree{}},
"C++": {confGitignoreC2, map[string]*bintree{}},
"CFWheels": {confGitignoreCfwheels, map[string]*bintree{}},
"CMake": {confGitignoreCmake, map[string]*bintree{}},
"CUDA": {confGitignoreCuda, map[string]*bintree{}},
"CVS": {confGitignoreCvs, map[string]*bintree{}},
"CakePHP": {confGitignoreCakephp, map[string]*bintree{}},
"ChefCookbook": {confGitignoreChefcookbook, map[string]*bintree{}},
"Cloud9": {confGitignoreCloud9, map[string]*bintree{}},
"CodeIgniter": {confGitignoreCodeigniter, map[string]*bintree{}},
"CodeKit": {confGitignoreCodekit, map[string]*bintree{}},
"CommonLisp": {confGitignoreCommonlisp, map[string]*bintree{}},
"Composer": {confGitignoreComposer, map[string]*bintree{}},
"Concrete5": {confGitignoreConcrete5, map[string]*bintree{}},
"Coq": {confGitignoreCoq, map[string]*bintree{}},
"CraftCMS": {confGitignoreCraftcms, map[string]*bintree{}},
"DM": {confGitignoreDm, map[string]*bintree{}},
"Dart": {confGitignoreDart, map[string]*bintree{}},
"DartEditor": {confGitignoreDarteditor, map[string]*bintree{}},
"Delphi": {confGitignoreDelphi, map[string]*bintree{}},
"Dreamweaver": {confGitignoreDreamweaver, map[string]*bintree{}},
"Drupal": {confGitignoreDrupal, map[string]*bintree{}},
"EPiServer": {confGitignoreEpiserver, map[string]*bintree{}},
"Eagle": {confGitignoreEagle, map[string]*bintree{}},
"Eclipse": {confGitignoreEclipse, map[string]*bintree{}},
"EiffelStudio": {confGitignoreEiffelstudio, map[string]*bintree{}},
"Elisp": {confGitignoreElisp, map[string]*bintree{}},
"Elixir": {confGitignoreElixir, map[string]*bintree{}},
"Emacs": {confGitignoreEmacs, map[string]*bintree{}},
"Ensime": {confGitignoreEnsime, map[string]*bintree{}},
"Erlang": {confGitignoreErlang, map[string]*bintree{}},
"Espresso": {confGitignoreEspresso, map[string]*bintree{}},
"ExpressionEngine": {confGitignoreExpressionengine, map[string]*bintree{}},
"ExtJs": {confGitignoreExtjs, map[string]*bintree{}},
"Fancy": {confGitignoreFancy, map[string]*bintree{}},
"Finale": {confGitignoreFinale, map[string]*bintree{}},
"FlexBuilder": {confGitignoreFlexbuilder, map[string]*bintree{}},
"ForceDotCom": {confGitignoreForcedotcom, map[string]*bintree{}},
"FuelPHP": {confGitignoreFuelphp, map[string]*bintree{}},
"GWT": {confGitignoreGwt, map[string]*bintree{}},
"Gcov": {confGitignoreGcov, map[string]*bintree{}},
"GitBook": {confGitignoreGitbook, map[string]*bintree{}},
"Go": {confGitignoreGo, map[string]*bintree{}},
"Gradle": {confGitignoreGradle, map[string]*bintree{}},
"Grails": {confGitignoreGrails, map[string]*bintree{}},
"Haskell": {confGitignoreHaskell, map[string]*bintree{}},
"IGORPro": {confGitignoreIgorpro, map[string]*bintree{}},
"IPythonNotebook": {confGitignoreIpythonnotebook, map[string]*bintree{}},
"Idris": {confGitignoreIdris, map[string]*bintree{}},
"JDeveloper": {confGitignoreJdeveloper, map[string]*bintree{}},
"Java": {confGitignoreJava, map[string]*bintree{}},
"Jboss": {confGitignoreJboss, map[string]*bintree{}},
"Jekyll": {confGitignoreJekyll, map[string]*bintree{}},
"JetBrains": {confGitignoreJetbrains, map[string]*bintree{}},
"Joomla": {confGitignoreJoomla, map[string]*bintree{}},
"KDevelop4": {confGitignoreKdevelop4, map[string]*bintree{}},
"Kate": {confGitignoreKate, map[string]*bintree{}},
"KiCAD": {confGitignoreKicad, map[string]*bintree{}},
"Kohana": {confGitignoreKohana, map[string]*bintree{}},
"LabVIEW": {confGitignoreLabview, map[string]*bintree{}},
"Laravel": {confGitignoreLaravel, map[string]*bintree{}},
"Lazarus": {confGitignoreLazarus, map[string]*bintree{}},
"Leiningen": {confGitignoreLeiningen, map[string]*bintree{}},
"LemonStand": {confGitignoreLemonstand, map[string]*bintree{}},
"LibreOffice": {confGitignoreLibreoffice, map[string]*bintree{}},
"Lilypond": {confGitignoreLilypond, map[string]*bintree{}},
"Linux": {confGitignoreLinux, map[string]*bintree{}},
"Lithium": {confGitignoreLithium, map[string]*bintree{}},
"Lua": {confGitignoreLua, map[string]*bintree{}},
"LyX": {confGitignoreLyx, map[string]*bintree{}},
"Magento": {confGitignoreMagento, map[string]*bintree{}},
"Matlab": {confGitignoreMatlab, map[string]*bintree{}},
"Maven": {confGitignoreMaven, map[string]*bintree{}},
"Mercurial": {confGitignoreMercurial, map[string]*bintree{}},
"Mercury": {confGitignoreMercury, map[string]*bintree{}},
"MetaProgrammingSystem": {confGitignoreMetaprogrammingsystem, map[string]*bintree{}},
"MicrosoftOffice": {confGitignoreMicrosoftoffice, map[string]*bintree{}},
"ModelSim": {confGitignoreModelsim, map[string]*bintree{}},
"Momentics": {confGitignoreMomentics, map[string]*bintree{}},
"MonoDevelop": {confGitignoreMonodevelop, map[string]*bintree{}},
"Nanoc": {confGitignoreNanoc, map[string]*bintree{}},
"NetBeans": {confGitignoreNetbeans, map[string]*bintree{}},
"Nim": {confGitignoreNim, map[string]*bintree{}},
"Ninja": {confGitignoreNinja, map[string]*bintree{}},
"Node": {confGitignoreNode, map[string]*bintree{}},
"NotepadPP": {confGitignoreNotepadpp, map[string]*bintree{}},
"OCaml": {confGitignoreOcaml, map[string]*bintree{}},
"OSX": {confGitignoreOsx, map[string]*bintree{}},
"Objective-C": {confGitignoreObjectiveC, map[string]*bintree{}},
"Opa": {confGitignoreOpa, map[string]*bintree{}},
"OpenCart": {confGitignoreOpencart, map[string]*bintree{}},
"OracleForms": {confGitignoreOracleforms, map[string]*bintree{}},
"Packer": {confGitignorePacker, map[string]*bintree{}},
"Perl": {confGitignorePerl, map[string]*bintree{}},
"Phalcon": {confGitignorePhalcon, map[string]*bintree{}},
"PlayFramework": {confGitignorePlayframework, map[string]*bintree{}},
"Plone": {confGitignorePlone, map[string]*bintree{}},
"Prestashop": {confGitignorePrestashop, map[string]*bintree{}},
"Processing": {confGitignoreProcessing, map[string]*bintree{}},
"Python": {confGitignorePython, map[string]*bintree{}},
"Qooxdoo": {confGitignoreQooxdoo, map[string]*bintree{}},
"Qt": {confGitignoreQt, map[string]*bintree{}},
"R": {confGitignoreR, map[string]*bintree{}},
"ROS": {confGitignoreRos, map[string]*bintree{}},
"Rails": {confGitignoreRails, map[string]*bintree{}},
"Redcar": {confGitignoreRedcar, map[string]*bintree{}},
"Redis": {confGitignoreRedis, map[string]*bintree{}},
"RhodesRhomobile": {confGitignoreRhodesrhomobile, map[string]*bintree{}},
"Ruby": {confGitignoreRuby, map[string]*bintree{}},
"Rust": {confGitignoreRust, map[string]*bintree{}},
"SBT": {confGitignoreSbt, map[string]*bintree{}},
"SCons": {confGitignoreScons, map[string]*bintree{}},
"SVN": {confGitignoreSvn, map[string]*bintree{}},
"Sass": {confGitignoreSass, map[string]*bintree{}},
"Scala": {confGitignoreScala, map[string]*bintree{}},
"Scrivener": {confGitignoreScrivener, map[string]*bintree{}},
"Sdcc": {confGitignoreSdcc, map[string]*bintree{}},
"SeamGen": {confGitignoreSeamgen, map[string]*bintree{}},
"SketchUp": {confGitignoreSketchup, map[string]*bintree{}},
"SlickEdit": {confGitignoreSlickedit, map[string]*bintree{}},
"Stella": {confGitignoreStella, map[string]*bintree{}},
"SublimeText": {confGitignoreSublimetext, map[string]*bintree{}},
"SugarCRM": {confGitignoreSugarcrm, map[string]*bintree{}},
"Swift": {confGitignoreSwift, map[string]*bintree{}},
"Symfony": {confGitignoreSymfony, map[string]*bintree{}},
"SymphonyCMS": {confGitignoreSymphonycms, map[string]*bintree{}},
"SynopsysVCS": {confGitignoreSynopsysvcs, map[string]*bintree{}},
"Tags": {confGitignoreTags, map[string]*bintree{}},
"TeX": {confGitignoreTex, map[string]*bintree{}},
"TextMate": {confGitignoreTextmate, map[string]*bintree{}},
"Textpattern": {confGitignoreTextpattern, map[string]*bintree{}},
"TortoiseGit": {confGitignoreTortoisegit, map[string]*bintree{}},
"TurboGears2": {confGitignoreTurbogears2, map[string]*bintree{}},
"Typo3": {confGitignoreTypo3, map[string]*bintree{}},
"Umbraco": {confGitignoreUmbraco, map[string]*bintree{}},
"Unity": {confGitignoreUnity, map[string]*bintree{}},
"VVVV": {confGitignoreVvvv, map[string]*bintree{}},
"Vagrant": {confGitignoreVagrant, map[string]*bintree{}},
"Vim": {confGitignoreVim, map[string]*bintree{}},
"VirtualEnv": {confGitignoreVirtualenv, map[string]*bintree{}},
"VisualStudio": {confGitignoreVisualstudio, map[string]*bintree{}},
"VisualStudioCode": {confGitignoreVisualstudiocode, map[string]*bintree{}},
"Waf": {confGitignoreWaf, map[string]*bintree{}},
"WebMethods": {confGitignoreWebmethods, map[string]*bintree{}},
"Windows": {confGitignoreWindows, map[string]*bintree{}},
"WordPress": {confGitignoreWordpress, map[string]*bintree{}},
"Xcode": {confGitignoreXcode, map[string]*bintree{}},
"XilinxISE": {confGitignoreXilinxise, map[string]*bintree{}},
"Xojo": {confGitignoreXojo, map[string]*bintree{}},
"Yeoman": {confGitignoreYeoman, map[string]*bintree{}},
"Yii": {confGitignoreYii, map[string]*bintree{}},
"ZendFramework": {confGitignoreZendframework, map[string]*bintree{}},
"Zephir": {confGitignoreZephir, map[string]*bintree{}},
}},
"license": {nil, map[string]*bintree{
"Abstyles License": {confLicenseAbstylesLicense, map[string]*bintree{}},
"Academic Free License v1.1": {confLicenseAcademicFreeLicenseV11, map[string]*bintree{}},
"Academic Free License v1.2": {confLicenseAcademicFreeLicenseV12, map[string]*bintree{}},
"Academic Free License v2.0": {confLicenseAcademicFreeLicenseV20, map[string]*bintree{}},
"Academic Free License v2.1": {confLicenseAcademicFreeLicenseV21, map[string]*bintree{}},
"Academic Free License v3.0": {confLicenseAcademicFreeLicenseV30, map[string]*bintree{}},
"Affero General Public License v1.0": {confLicenseAfferoGeneralPublicLicenseV10, map[string]*bintree{}},
"Apache License 1.0": {confLicenseApacheLicense10, map[string]*bintree{}},
"Apache License 1.1": {confLicenseApacheLicense11, map[string]*bintree{}},
"Apache License 2.0": {confLicenseApacheLicense20, map[string]*bintree{}},
"Artistic License 1.0": {confLicenseArtisticLicense10, map[string]*bintree{}},
"Artistic License 2.0": {confLicenseArtisticLicense20, map[string]*bintree{}},
"BSD 2-clause License": {confLicenseBsd2ClauseLicense, map[string]*bintree{}},
"BSD 3-clause License": {confLicenseBsd3ClauseLicense, map[string]*bintree{}},
"BSD 4-clause License": {confLicenseBsd4ClauseLicense, map[string]*bintree{}},
"Creative Commons CC0 1.0 Universal": {confLicenseCreativeCommonsCc010Universal, map[string]*bintree{}},
"Eclipse Public License 1.0": {confLicenseEclipsePublicLicense10, map[string]*bintree{}},
"Educational Community License v1.0": {confLicenseEducationalCommunityLicenseV10, map[string]*bintree{}},
"Educational Community License v2.0": {confLicenseEducationalCommunityLicenseV20, map[string]*bintree{}},
"GNU Affero General Public License v3.0": {confLicenseGnuAfferoGeneralPublicLicenseV30, map[string]*bintree{}},
"GNU Free Documentation License v1.1": {confLicenseGnuFreeDocumentationLicenseV11, map[string]*bintree{}},
"GNU Free Documentation License v1.2": {confLicenseGnuFreeDocumentationLicenseV12, map[string]*bintree{}},
"GNU Free Documentation License v1.3": {confLicenseGnuFreeDocumentationLicenseV13, map[string]*bintree{}},
"GNU General Public License v1.0": {confLicenseGnuGeneralPublicLicenseV10, map[string]*bintree{}},
"GNU General Public License v2.0": {confLicenseGnuGeneralPublicLicenseV20, map[string]*bintree{}},
"GNU General Public License v3.0": {confLicenseGnuGeneralPublicLicenseV30, map[string]*bintree{}},
"GNU Lesser General Public License v2.1": {confLicenseGnuLesserGeneralPublicLicenseV21, map[string]*bintree{}},
"GNU Lesser General Public License v3.0": {confLicenseGnuLesserGeneralPublicLicenseV30, map[string]*bintree{}},
"GNU Library General Public License v2.0": {confLicenseGnuLibraryGeneralPublicLicenseV20, map[string]*bintree{}},
"ISC license": {confLicenseIscLicense, map[string]*bintree{}},
"MIT License": {confLicenseMitLicense, map[string]*bintree{}},
"Mozilla Public License 1.0": {confLicenseMozillaPublicLicense10, map[string]*bintree{}},
"Mozilla Public License 1.1": {confLicenseMozillaPublicLicense11, map[string]*bintree{}},
"Mozilla Public License 2.0": {confLicenseMozillaPublicLicense20, map[string]*bintree{}},
}},
"locale": {nil, map[string]*bintree{
"locale_bg-BG.ini": {confLocaleLocale_bgBgIni, map[string]*bintree{}},
"locale_de-DE.ini": {confLocaleLocale_deDeIni, map[string]*bintree{}},
"locale_en-US.ini": {confLocaleLocale_enUsIni, map[string]*bintree{}},
"locale_es-ES.ini": {confLocaleLocale_esEsIni, map[string]*bintree{}},
"locale_fr-FR.ini": {confLocaleLocale_frFrIni, map[string]*bintree{}},
"locale_it-IT.ini": {confLocaleLocale_itItIni, map[string]*bintree{}},
"locale_ja-JP.ini": {confLocaleLocale_jaJpIni, map[string]*bintree{}},
"locale_lv-LV.ini": {confLocaleLocale_lvLvIni, map[string]*bintree{}},
"locale_nl-NL.ini": {confLocaleLocale_nlNlIni, map[string]*bintree{}},
"locale_pl-PL.ini": {confLocaleLocale_plPlIni, map[string]*bintree{}},
"locale_pt-BR.ini": {confLocaleLocale_ptBrIni, map[string]*bintree{}},
"locale_ru-RU.ini": {confLocaleLocale_ruRuIni, map[string]*bintree{}},
"locale_zh-CN.ini": {confLocaleLocale_zhCnIni, map[string]*bintree{}},
"locale_zh-HK.ini": {confLocaleLocale_zhHkIni, map[string]*bintree{}},
}},
"readme": {nil, map[string]*bintree{
"Default": {confReadmeDefault, map[string]*bintree{}},
}},
}},
}}
@ -5379,4 +5165,3 @@ func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}

2
routers/repo/view.go

@ -199,7 +199,7 @@ func Home(ctx *middleware.Context) {
if len(treename) > 0 {
treenames = strings.Split(treename, "/")
for i, _ := range treenames {
for i := range treenames {
Paths = append(Paths, strings.Join(treenames[0:i+1], "/"))
}

Loading…
Cancel
Save