commit
0e28dcdac4
@ -1,49 +1,31 @@ |
||||
# Contributing to Gogs |
||||
|
||||
Want to hack on Gogs? Awesome! Here are instructions to get you |
||||
started. They are probably not perfect, please let us know if anything |
||||
feels wrong or incomplete. |
||||
> Thanks [drone](https://github.com/drone/drone) because this guidelines sheet is forked from its [CONTRIBUTING.md](https://github.com/drone/drone/blob/master/CONTRIBUTING.md). |
||||
|
||||
**This document is pre^3 release, we're not ready for receiving contribution until v0.5.0 release.** |
||||
|
||||
Want to hack on Gogs? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete. |
||||
|
||||
## Contribution guidelines |
||||
|
||||
### Pull requests are always welcome |
||||
|
||||
We are always thrilled to receive pull requests, and do our best to |
||||
process them as fast as possible. Not sure if that typo is worth a pull |
||||
request? Do it! We will appreciate it. |
||||
We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it. |
||||
|
||||
If your pull request is not accepted on the first try, don't be |
||||
discouraged! If there's a problem with the implementation, hopefully you |
||||
received feedback on what to improve. |
||||
If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve. |
||||
|
||||
We're trying very hard to keep Gogs lean and focused. We don't want it |
||||
to do everything for everybody. This means that we might decide against |
||||
incorporating a new feature. |
||||
We're trying very hard to keep Gogs lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature. |
||||
|
||||
### Discuss your design on the mailing list |
||||
|
||||
We recommend discussing your plans [on the mailing |
||||
list](https://groups.google.com/forum/#!forum/gogits) |
||||
before starting to code - especially for more ambitious contributions. |
||||
This gives other contributors a chance to point you in the right |
||||
direction, give feedback on your design, and maybe point out if someone |
||||
else is working on the same thing. |
||||
We recommend discussing your plans [on the mailing list](https://groups.google.com/forum/#!forum/gogits) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing. |
||||
|
||||
We may close your pull request if not first discussed on the mailing |
||||
list. We aren't doing this to be jerks. We are doing this to prevent |
||||
people from spending large amounts of time on changes that may need |
||||
to be designed or architected in a specific way, or may not align with |
||||
the vision of the project. |
||||
We may close your pull request if not first discussed on the mailing list. We aren't doing this to be jerks. We are doing this to prevent people from spending large amounts of time on changes that may need to be designed or architected in a specific way, or may not align with the vision of the project. |
||||
|
||||
### Create issues... |
||||
|
||||
Any significant improvement should be documented as [a GitHub |
||||
issue](https://github.com/gogits/gogs/issues) before anybody |
||||
starts working on it. |
||||
Any significant improvement should be documented as [a GitHub issue](https://github.com/gogits/gogs/issues) before anybody starts working on it. |
||||
|
||||
### ...but check for existing issues first! |
||||
|
||||
Please take a moment to check that an issue doesn't already exist |
||||
documenting your bug report or improvement proposal. If it does, it |
||||
never hurts to add a quick "+1" or "I have this problem too". This will |
||||
help prioritize the most common problems and requests. |
||||
Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests. |
@ -0,0 +1,296 @@ |
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// for www.gravatar.com image cache
|
||||
|
||||
/* |
||||
It is recommend to use this way |
||||
|
||||
cacheDir := "./cache" |
||||
defaultImg := "./default.jpg" |
||||
http.Handle("/avatar/", avatar.HttpHandler(cacheDir, defaultImg)) |
||||
*/ |
||||
package avatar |
||||
|
||||
import ( |
||||
"crypto/md5" |
||||
"encoding/hex" |
||||
"errors" |
||||
"fmt" |
||||
"image" |
||||
"image/jpeg" |
||||
"image/png" |
||||
"io" |
||||
"net/http" |
||||
"net/url" |
||||
"os" |
||||
"path/filepath" |
||||
"strings" |
||||
"sync" |
||||
"time" |
||||
|
||||
"github.com/gogits/gogs/modules/log" |
||||
"github.com/nfnt/resize" |
||||
) |
||||
|
||||
var ( |
||||
gravatar = "http://www.gravatar.com/avatar" |
||||
) |
||||
|
||||
// hash email to md5 string
|
||||
// keep this func in order to make this package indenpent
|
||||
func HashEmail(email string) string { |
||||
h := md5.New() |
||||
h.Write([]byte(strings.ToLower(email))) |
||||
return hex.EncodeToString(h.Sum(nil)) |
||||
} |
||||
|
||||
type Avatar struct { |
||||
Hash string |
||||
AlterImage string // image path
|
||||
cacheDir string // image save dir
|
||||
reqParams string |
||||
imagePath string |
||||
expireDuration time.Duration |
||||
} |
||||
|
||||
func New(hash string, cacheDir string) *Avatar { |
||||
return &Avatar{ |
||||
Hash: hash, |
||||
cacheDir: cacheDir, |
||||
expireDuration: time.Minute * 10, |
||||
reqParams: url.Values{ |
||||
"d": {"retro"}, |
||||
"size": {"200"}, |
||||
"r": {"pg"}}.Encode(), |
||||
imagePath: filepath.Join(cacheDir, hash+".image"), //maybe png or jpeg
|
||||
} |
||||
} |
||||
|
||||
func (this *Avatar) HasCache() bool { |
||||
fileInfo, err := os.Stat(this.imagePath) |
||||
return err == nil && fileInfo.Mode().IsRegular() |
||||
} |
||||
|
||||
func (this *Avatar) Modtime() (modtime time.Time, err error) { |
||||
fileInfo, err := os.Stat(this.imagePath) |
||||
if err != nil { |
||||
return |
||||
} |
||||
return fileInfo.ModTime(), nil |
||||
} |
||||
|
||||
func (this *Avatar) Expired() bool { |
||||
modtime, err := this.Modtime() |
||||
return err != nil || time.Since(modtime) > this.expireDuration |
||||
} |
||||
|
||||
// default image format: jpeg
|
||||
func (this *Avatar) Encode(wr io.Writer, size int) (err error) { |
||||
var img image.Image |
||||
decodeImageFile := func(file string) (img image.Image, err error) { |
||||
fd, err := os.Open(file) |
||||
if err != nil { |
||||
return |
||||
} |
||||
defer fd.Close() |
||||
img, err = jpeg.Decode(fd) |
||||
if err != nil { |
||||
fd.Seek(0, os.SEEK_SET) |
||||
img, err = png.Decode(fd) |
||||
} |
||||
return |
||||
} |
||||
imgPath := this.imagePath |
||||
if !this.HasCache() { |
||||
if this.AlterImage == "" { |
||||
return errors.New("request image failed, and no alt image offered") |
||||
} |
||||
imgPath = this.AlterImage |
||||
} |
||||
img, err = decodeImageFile(imgPath) |
||||
if err != nil { |
||||
return |
||||
} |
||||
m := resize.Resize(uint(size), 0, img, resize.Lanczos3) |
||||
return jpeg.Encode(wr, m, nil) |
||||
} |
||||
|
||||
// get image from gravatar.com
|
||||
func (this *Avatar) Update() { |
||||
thunder.Fetch(gravatar+"/"+this.Hash+"?"+this.reqParams, |
||||
this.imagePath) |
||||
} |
||||
|
||||
func (this *Avatar) UpdateTimeout(timeout time.Duration) error { |
||||
var err error |
||||
select { |
||||
case <-time.After(timeout): |
||||
err = fmt.Errorf("get gravatar image %s timeout", this.Hash) |
||||
case err = <-thunder.GoFetch(gravatar+"/"+this.Hash+"?"+this.reqParams, |
||||
this.imagePath): |
||||
} |
||||
return err |
||||
} |
||||
|
||||
type avatarHandler struct { |
||||
cacheDir string |
||||
altImage string |
||||
} |
||||
|
||||
func (this *avatarHandler) mustInt(r *http.Request, defaultValue int, keys ...string) int { |
||||
var v int |
||||
for _, k := range keys { |
||||
if _, err := fmt.Sscanf(r.FormValue(k), "%d", &v); err == nil { |
||||
defaultValue = v |
||||
} |
||||
} |
||||
return defaultValue |
||||
} |
||||
|
||||
func (this *avatarHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
||||
urlPath := r.URL.Path |
||||
hash := urlPath[strings.LastIndex(urlPath, "/")+1:] |
||||
size := this.mustInt(r, 80, "s", "size") // default size = 80*80
|
||||
|
||||
avatar := New(hash, this.cacheDir) |
||||
avatar.AlterImage = this.altImage |
||||
if avatar.Expired() { |
||||
err := avatar.UpdateTimeout(time.Millisecond * 500) |
||||
if err != nil { |
||||
log.Trace("avatar update error: %v", err) |
||||
} |
||||
} |
||||
if modtime, err := avatar.Modtime(); err == nil { |
||||
etag := fmt.Sprintf("size(%d)", size) |
||||
if t, err := time.Parse(http.TimeFormat, r.Header.Get("If-Modified-Since")); err == nil && modtime.Before(t.Add(1*time.Second)) && etag == r.Header.Get("If-None-Match") { |
||||
h := w.Header() |
||||
delete(h, "Content-Type") |
||||
delete(h, "Content-Length") |
||||
w.WriteHeader(http.StatusNotModified) |
||||
return |
||||
} |
||||
w.Header().Set("Last-Modified", modtime.UTC().Format(http.TimeFormat)) |
||||
w.Header().Set("ETag", etag) |
||||
} |
||||
w.Header().Set("Content-Type", "image/jpeg") |
||||
err := avatar.Encode(w, size) |
||||
if err != nil { |
||||
log.Warn("avatar encode error: %v", err) |
||||
w.WriteHeader(500) |
||||
} |
||||
} |
||||
|
||||
// http.Handle("/avatar/", avatar.HttpHandler("./cache"))
|
||||
func HttpHandler(cacheDir string, defaultImgPath string) http.Handler { |
||||
return &avatarHandler{ |
||||
cacheDir: cacheDir, |
||||
altImage: defaultImgPath, |
||||
} |
||||
} |
||||
|
||||
// thunder downloader
|
||||
var thunder = &Thunder{QueueSize: 10} |
||||
|
||||
type Thunder struct { |
||||
QueueSize int // download queue size
|
||||
q chan *thunderTask |
||||
once sync.Once |
||||
} |
||||
|
||||
func (t *Thunder) init() { |
||||
if t.QueueSize < 1 { |
||||
t.QueueSize = 1 |
||||
} |
||||
t.q = make(chan *thunderTask, t.QueueSize) |
||||
for i := 0; i < t.QueueSize; i++ { |
||||
go func() { |
||||
for { |
||||
task := <-t.q |
||||
task.Fetch() |
||||
} |
||||
}() |
||||
} |
||||
} |
||||
|
||||
func (t *Thunder) Fetch(url string, saveFile string) error { |
||||
t.once.Do(t.init) |
||||
task := &thunderTask{ |
||||
Url: url, |
||||
SaveFile: saveFile, |
||||
} |
||||
task.Add(1) |
||||
t.q <- task |
||||
task.Wait() |
||||
return task.err |
||||
} |
||||
|
||||
func (t *Thunder) GoFetch(url, saveFile string) chan error { |
||||
c := make(chan error) |
||||
go func() { |
||||
c <- t.Fetch(url, saveFile) |
||||
}() |
||||
return c |
||||
} |
||||
|
||||
// thunder download
|
||||
type thunderTask struct { |
||||
Url string |
||||
SaveFile string |
||||
sync.WaitGroup |
||||
err error |
||||
} |
||||
|
||||
func (this *thunderTask) Fetch() { |
||||
this.err = this.fetch() |
||||
this.Done() |
||||
} |
||||
|
||||
var client = &http.Client{} |
||||
|
||||
func (this *thunderTask) fetch() error { |
||||
req, _ := http.NewRequest("GET", this.Url, nil) |
||||
req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") |
||||
req.Header.Set("Accept-Encoding", "gzip,deflate,sdch") |
||||
req.Header.Set("Accept-Language", "zh-CN,zh;q=0.8") |
||||
req.Header.Set("Cache-Control", "no-cache") |
||||
req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36") |
||||
resp, err := client.Do(req) |
||||
if err != nil { |
||||
return err |
||||
} |
||||
defer resp.Body.Close() |
||||
if resp.StatusCode != 200 { |
||||
return fmt.Errorf("status code: %d", resp.StatusCode) |
||||
} |
||||
|
||||
/* |
||||
log.Println("headers:", resp.Header) |
||||
switch resp.Header.Get("Content-Type") { |
||||
case "image/jpeg": |
||||
this.SaveFile += ".jpeg" |
||||
case "image/png": |
||||
this.SaveFile += ".png" |
||||
} |
||||
*/ |
||||
/* |
||||
imgType := resp.Header.Get("Content-Type") |
||||
if imgType != "image/jpeg" && imgType != "image/png" { |
||||
return errors.New("not png or jpeg") |
||||
} |
||||
*/ |
||||
|
||||
tmpFile := this.SaveFile + ".part" // mv to destination when finished
|
||||
fd, err := os.Create(tmpFile) |
||||
if err != nil { |
||||
return err |
||||
} |
||||
_, err = io.Copy(fd, resp.Body) |
||||
fd.Close() |
||||
if err != nil { |
||||
os.Remove(tmpFile) |
||||
return err |
||||
} |
||||
return os.Rename(tmpFile, this.SaveFile) |
||||
} |
@ -0,0 +1,61 @@ |
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
package avatar_test |
||||
|
||||
import ( |
||||
"errors" |
||||
"os" |
||||
"strconv" |
||||
"testing" |
||||
"time" |
||||
|
||||
"github.com/gogits/gogs/modules/avatar" |
||||
"github.com/gogits/gogs/modules/log" |
||||
) |
||||
|
||||
const TMPDIR = "test-avatar" |
||||
|
||||
func TestFetch(t *testing.T) { |
||||
os.Mkdir(TMPDIR, 0755) |
||||
defer os.RemoveAll(TMPDIR) |
||||
|
||||
hash := avatar.HashEmail("ssx205@gmail.com") |
||||
a := avatar.New(hash, TMPDIR) |
||||
a.UpdateTimeout(time.Millisecond * 200) |
||||
} |
||||
|
||||
func TestFetchMany(t *testing.T) { |
||||
os.Mkdir(TMPDIR, 0755) |
||||
defer os.RemoveAll(TMPDIR) |
||||
|
||||
t.Log("start") |
||||
var n = 5 |
||||
ch := make(chan bool, n) |
||||
for i := 0; i < n; i++ { |
||||
go func(i int) { |
||||
hash := avatar.HashEmail(strconv.Itoa(i) + "ssx205@gmail.com") |
||||
a := avatar.New(hash, TMPDIR) |
||||
a.Update() |
||||
t.Log("finish", hash) |
||||
ch <- true |
||||
}(i) |
||||
} |
||||
for i := 0; i < n; i++ { |
||||
<-ch |
||||
} |
||||
t.Log("end") |
||||
} |
||||
|
||||
// cat
|
||||
// wget http://www.artsjournal.com/artfulmanager/wp/wp-content/uploads/2013/12/200x200xmirror_cat.jpg.pagespeed.ic.GOZSv6v1_H.jpg -O default.jpg
|
||||
/* |
||||
func TestHttp(t *testing.T) { |
||||
http.Handle("/", avatar.HttpHandler("./", "default.jpg")) |
||||
http.ListenAndServe(":8001", nil) |
||||
} |
||||
*/ |
||||
|
||||
func TestLogTrace(t *testing.T) { |
||||
log.Trace("%v", errors.New("console log test")) |
||||
} |
After Width: | Height: | Size: 6.8 KiB |
@ -0,0 +1,38 @@ |
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package repo |
||||
|
||||
import ( |
||||
"github.com/codegangsta/martini" |
||||
"github.com/gogits/gogs/models" |
||||
"github.com/gogits/gogs/modules/middleware" |
||||
) |
||||
|
||||
func Branches(ctx *middleware.Context, params martini.Params) { |
||||
if !ctx.Repo.IsValid { |
||||
return |
||||
} |
||||
|
||||
brs, err := models.GetBranches(params["username"], params["reponame"]) |
||||
if err != nil { |
||||
ctx.Handle(200, "repo.Branches", err) |
||||
return |
||||
} else if len(brs) == 0 { |
||||
ctx.Handle(404, "repo.Branches", nil) |
||||
return |
||||
} |
||||
|
||||
ctx.Data["Username"] = params["username"] |
||||
ctx.Data["Reponame"] = params["reponame"] |
||||
|
||||
if len(params["branchname"]) == 0 { |
||||
params["branchname"] = "master" |
||||
} |
||||
ctx.Data["Branchname"] = params["branchname"] |
||||
ctx.Data["Branches"] = brs |
||||
ctx.Data["IsRepoToolbarBranches"] = true |
||||
|
||||
ctx.HTML(200, "repo/branches") |
||||
} |
@ -0,0 +1,41 @@ |
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package repo |
||||
|
||||
import ( |
||||
"github.com/codegangsta/martini" |
||||
"github.com/gogits/gogs/models" |
||||
"github.com/gogits/gogs/modules/middleware" |
||||
) |
||||
|
||||
func Commits(ctx *middleware.Context, params martini.Params) { |
||||
brs, err := models.GetBranches(params["username"], params["reponame"]) |
||||
if err != nil { |
||||
ctx.Handle(200, "repo.Commits", err) |
||||
return |
||||
} else if len(brs) == 0 { |
||||
ctx.Handle(404, "repo.Commits", nil) |
||||
return |
||||
} |
||||
|
||||
ctx.Data["IsRepoToolbarCommits"] = true |
||||
commits, err := models.GetCommits(params["username"], |
||||
params["reponame"], params["branchname"]) |
||||
if err != nil { |
||||
ctx.Handle(404, "repo.Commits", nil) |
||||
return |
||||
} |
||||
ctx.Data["Username"] = params["username"] |
||||
ctx.Data["Reponame"] = params["reponame"] |
||||
ctx.Data["CommitCount"] = commits.Len() |
||||
ctx.Data["Commits"] = commits |
||||
ctx.HTML(200, "repo/commits") |
||||
} |
||||
|
||||
func Diff(ctx *middleware.Context,params martini.Params){ |
||||
ctx.Data["Title"] = "commit-sha" |
||||
ctx.Data["IsRepoToolbarCommits"] = true |
||||
ctx.HTML(200,"repo/diff") |
||||
} |
@ -0,0 +1,21 @@ |
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package repo |
||||
|
||||
import ( |
||||
"github.com/codegangsta/martini" |
||||
|
||||
"github.com/gogits/gogs/modules/middleware" |
||||
) |
||||
|
||||
func Pulls(ctx *middleware.Context, params martini.Params) { |
||||
ctx.Data["IsRepoToolbarPulls"] = true |
||||
if len(params["branchname"]) == 0 { |
||||
params["branchname"] = "master" |
||||
} |
||||
|
||||
ctx.Data["Branchname"] = params["branchname"] |
||||
ctx.HTML(200, "repo/pulls") |
||||
} |
@ -0,0 +1,448 @@ |
||||
{{template "base/head" .}} |
||||
{{template "base/navbar" .}} |
||||
{{template "repo/nav" .}} |
||||
{{template "repo/toolbar" .}} |
||||
<div id="gogs-body" class="container" data-page="repo"> |
||||
<div id="gogs-source"> |
||||
<div class="panel panel-info diff-box diff-head-box"> |
||||
<div class="panel-heading"> |
||||
<a class="pull-right btn btn-primary btn-sm" href="#commit-source">Browse Source</a> |
||||
<h4>bsongen: support for custom tags</h4> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<span class="pull-right"> |
||||
commit <span class="label label-default sha">commit-sha</span> |
||||
</span> |
||||
<p class="author"> |
||||
<img class="avatar" src="#" alt=""/> |
||||
<a class="name" href="#"><strong>author-name</strong></a> |
||||
<span class="time">times-ago</span> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="diff-detail-box diff-box"> |
||||
<a class="pull-right btn btn-default" data-toggle="collapse" data-target="#diff-files">Show Diff Files</a> |
||||
<p class="showing"> |
||||
<i class="fa fa-retweet"></i> |
||||
<strong> 5 changed files</strong> with <strong>25 additions</strong> and <strong>9 deletions</strong>. |
||||
</p> |
||||
<ol class="detail-files collapse" id="diff-files"> |
||||
<li> |
||||
<div class="diff-counter count pull-right"> |
||||
<span class="add" data-line="2">2</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="4">4</span> |
||||
</div> |
||||
<!-- todo finish all file status, now modify, add, delete and rename --> |
||||
<span class="status modify" data-toggle="tooltip" data-placement="right" title="modify"> </span> |
||||
<a class="file" href="#diff-1">gopmweb.go</a> |
||||
</li> |
||||
<li> |
||||
<div class="diff-counter count pull-right"> |
||||
<span class="add" data-line="666">666</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="44">44</span> |
||||
</div> |
||||
<span class="status add" data-toggle="tooltip" data-placement="right" title="add"> </span> |
||||
<a class="file" href="#diff-2">static/img/favicon.png</a> |
||||
</li> |
||||
<li> |
||||
<span class="status del" data-toggle="tooltip" data-placement="right" title="delete"> </span> |
||||
<a class="file" href="#diff-2">static/img/favicon.png</a> |
||||
</li> |
||||
<li> |
||||
<span class="status rename" data-toggle="tooltip" data-placement="right" title="rename"> </span> |
||||
<a class="file" href="#diff-2">static/img/favicon.png</a> |
||||
</li> |
||||
</ol> |
||||
</div> |
||||
|
||||
<div class="panel panel-default diff-file-box diff-box file-content" id="diff-1"> |
||||
<div class="panel-heading"> |
||||
<div class="diff-counter count pull-left"> |
||||
<span class="add" data-line="1">BIN</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="0"></span> |
||||
</div> |
||||
<a class="btn btn-default btn-sm pull-right" href="#">View File</a> |
||||
<span class="file">data/test/bson_test/simple_type.png</span> |
||||
</div> |
||||
<div class="panel-body file-body file-code code-view code-bin"> |
||||
<table> |
||||
<tbody> |
||||
<tr class="text-center"><td><img src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?s=200" alt=""/></td></tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="panel panel-default diff-file-box diff-box file-content" id="diff-2"> |
||||
<div class="panel-heading"> |
||||
<div class="diff-counter count pull-left"> |
||||
<span class="add" data-line="30">+ 30</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="4">- 4</span> |
||||
</div> |
||||
<a class="btn btn-default btn-sm pull-right" href="#">View File</a> |
||||
<span class="file">data/test/bson_test/simple_type.go</span> |
||||
</div> |
||||
<div class="panel-body file-body file-code code-view code-diff"> |
||||
<table> |
||||
<tbody> |
||||
<tr class="same-code nl-1 ol-1"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">1</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">1</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-2 ol-2"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">2</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">2</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-3 ol-3"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L3">3</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L3">3</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="add-code nl-4 ol-0"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="add">+</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L4">4</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="add-code nl-5 ol-0"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="add">+</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L5">5</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-4"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L4">4</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-5"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L5">5</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-6"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L6">6</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-7"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L7">7</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-6 ol-8"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L8">8</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L6">6</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-7 ol-9"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">9</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">7</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-8 ol-10"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">10</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">8</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="panel panel-default diff-file-box diff-box file-content"> |
||||
<div class="panel-heading"> |
||||
<div class="diff-counter count pull-left"> |
||||
<span class="add" data-line="2">+ 2</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="4">- 4</span> |
||||
</div> |
||||
<a class="btn btn-default btn-sm pull-right" href="#">View File</a> |
||||
<span class="file">data/test/bson_test/simple_type.go</span> |
||||
</div> |
||||
<div class="panel-body file-body file-code code-view code-diff"> |
||||
<table> |
||||
<tbody> |
||||
<tr class="same-code nl-1 ol-1"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">1</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">1</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-2 ol-2"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">2</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">2</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-3 ol-3"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L3">3</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L3">3</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="add-code nl-4 ol-0"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="add">+</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L4">4</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="add-code nl-5 ol-0"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="add">+</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L5">5</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-4"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L4">4</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-5"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L5">5</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-6"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L6">6</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="del-code nl-0 ol-7"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L7">7</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="del">-</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-6 ol-8"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L8">8</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L6">6</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-7 ol-9"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">9</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">7</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-8 ol-10"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">10</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">8</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="ellipsis-code"> |
||||
<td class="text-center lines-ellipsis" colspan="2"> |
||||
<i class="fa fa-ellipsis-h"></i> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-8 ol-10"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">10</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">8</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
<tr class="same-code nl-8 ol-10"> |
||||
<td class="lines-num lines-num-old"> |
||||
<span rel="L1">10</span> |
||||
</td> |
||||
<td class="lines-num lines-num-new"> |
||||
<span rel="L1">8</span> |
||||
</td> |
||||
<td class="lines-code"> |
||||
<pre> "github.com/youtube/vitess/go/bson"</pre> |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="panel panel-default diff-file-box diff-box file-content"> |
||||
<div class="panel-heading"> |
||||
<div class="diff-counter count pull-left"> |
||||
<span class="add" data-line="0">BIN</span> |
||||
<span class="bar"> |
||||
<span class="pull-left add"></span> |
||||
<span class="pull-left del"></span> |
||||
</span> |
||||
<span class="del" data-line="1"></span> |
||||
</div> |
||||
<a class="btn btn-default btn-sm pull-right" href="#">View File</a> |
||||
<span class="file">data/test/bson_test/simple_type.png</span> |
||||
</div> |
||||
<div class="panel-body file-body file-code code-view code-bin"> |
||||
<table> |
||||
<tbody> |
||||
<tr class="text-center"><td><img src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?s=200" alt=""/></td></tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{template "base/footer" .}} |
Loading…
Reference in new issue