Migrate to dep (#3972)
* Update makefile to use dep * Migrate to dep * Fix some deps * Try to find a better version for golang.org/x/net * Try to find a better version for golang.org/x/oauth2
This commit is contained in:
parent
d7fd9bf7bb
commit
3f3383dc0a
281 changed files with 12024 additions and 32676 deletions
37
vendor/github.com/Unknwon/cae/README.md
generated
vendored
37
vendor/github.com/Unknwon/cae/README.md
generated
vendored
|
@ -1,37 +0,0 @@
|
|||
Compression and Archive Extensions
|
||||
==================================
|
||||
|
||||
[](http://gowalker.org/github.com/Unknwon/cae)
|
||||
|
||||
[中文文档](README_ZH.md)
|
||||
|
||||
Package cae implements PHP-like Compression and Archive Extensions.
|
||||
|
||||
But this package has some modifications depends on Go-style.
|
||||
|
||||
Reference: [PHP:Compression and Archive Extensions](http://www.php.net/manual/en/refs.compression.php).
|
||||
|
||||
Code Convention: based on [Go Code Convention](https://github.com/Unknwon/go-code-convention).
|
||||
|
||||
### Implementations
|
||||
|
||||
Package `zip`([Go Walker](http://gowalker.org/github.com/Unknwon/cae/zip)) and `tz`([Go Walker](http://gowalker.org/github.com/Unknwon/cae/tz)) both enable you to transparently read or write ZIP/TAR.GZ compressed archives and the files inside them.
|
||||
|
||||
- Features:
|
||||
- Add file or directory from everywhere to archive, no one-to-one limitation.
|
||||
- Extract part of entries, not all at once.
|
||||
- Stream data directly into `io.Writer` without any file system storage.
|
||||
|
||||
### Test cases and Coverage
|
||||
|
||||
All subpackages use [GoConvey](http://goconvey.co/) to write test cases, and coverage is more than 80 percent.
|
||||
|
||||
### Use cases
|
||||
|
||||
- [Gogs](https://github.com/gogits/gogs): self hosted Git service in the Go Programming Language.
|
||||
- [GoBlog](https://github.com/fuxiaohei/GoBlog): personal blogging application.
|
||||
- [GoBuild](https://github.com/shxsun/gobuild/): online Go cross-platform compilation and download service.
|
||||
|
||||
## License
|
||||
|
||||
This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text.
|
29
vendor/github.com/Unknwon/cae/README_ZH.md
generated
vendored
29
vendor/github.com/Unknwon/cae/README_ZH.md
generated
vendored
|
@ -1,29 +0,0 @@
|
|||
压缩与打包扩展
|
||||
=============
|
||||
|
||||
[](http://gowalker.org/github.com/Unknwon/cae)
|
||||
|
||||
包 cae 实现了 PHP 风格的压缩与打包扩展。
|
||||
|
||||
但本包依据 Go 语言的风格进行了一些修改。
|
||||
|
||||
引用:[PHP:Compression and Archive Extensions](http://www.php.net/manual/en/refs.compression.php)
|
||||
|
||||
编码规范:基于 [Go 编码规范](https://github.com/Unknwon/go-code-convention)
|
||||
|
||||
### 实现
|
||||
|
||||
包 `zip`([Go Walker](http://gowalker.org/github.com/Unknwon/cae/zip)) 和 `tz`([Go Walker](http://gowalker.org/github.com/Unknwon/cae/tz)) 都允许你轻易的读取或写入 ZIP/TAR.GZ 压缩档案和其内部文件。
|
||||
|
||||
- 特性:
|
||||
- 将任意位置的文件或目录加入档案,没有一对一的操作限制。
|
||||
- 只解压部分文件,而非一次性解压全部。
|
||||
- 将数据以流的形式直接写入 `io.Writer` 而不需经过文件系统的存储。
|
||||
|
||||
### 测试用例与覆盖率
|
||||
|
||||
所有子包均采用 [GoConvey](http://goconvey.co/) 来书写测试用例,覆盖率均超过 80%。
|
||||
|
||||
## 授权许可
|
||||
|
||||
本项目采用 Apache v2 开源授权许可证,完整的授权说明已放置在 [LICENSE](LICENSE) 文件中。
|
1
vendor/github.com/Unknwon/cae/tz/testdata/test.lnk
generated
vendored
Symbolic link
1
vendor/github.com/Unknwon/cae/tz/testdata/test.lnk
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
test.zip
|
1
vendor/github.com/Unknwon/cae/tz/testdata/testdir.lnk
generated
vendored
Symbolic link
1
vendor/github.com/Unknwon/cae/tz/testdata/testdir.lnk
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
testdir
|
1
vendor/github.com/Unknwon/cae/zip/testdata/test.lnk
generated
vendored
Symbolic link
1
vendor/github.com/Unknwon/cae/zip/testdata/test.lnk
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
test.zip
|
1
vendor/github.com/Unknwon/cae/zip/testdata/testdir.lnk
generated
vendored
Symbolic link
1
vendor/github.com/Unknwon/cae/zip/testdata/testdir.lnk
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
testdir
|
20
vendor/github.com/Unknwon/com/README.md
generated
vendored
20
vendor/github.com/Unknwon/com/README.md
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
Common Functions
|
||||
================
|
||||
|
||||
[](https://travis-ci.org/Unknwon/com) [](http://gowalker.org/github.com/Unknwon/com)
|
||||
|
||||
This is an open source project for commonly used functions for the Go programming language.
|
||||
|
||||
This package need >= **go 1.2**
|
||||
|
||||
Code Convention: based on [Go Code Convention](https://github.com/Unknwon/go-code-convention).
|
||||
|
||||
## Contribute
|
||||
|
||||
Your contribute is welcome, but you have to check following steps after you added some functions and commit them:
|
||||
|
||||
1. Make sure you wrote user-friendly comments for **all functions** .
|
||||
2. Make sure you wrote test cases with any possible condition for **all functions** in file `*_test.go`.
|
||||
3. Make sure you wrote benchmarks for **all functions** in file `*_test.go`.
|
||||
4. Make sure you wrote useful examples for **all functions** in file `example_test.go`.
|
||||
5. Make sure you ran `go test` and got **PASS** .
|
12
vendor/github.com/Unknwon/i18n/Makefile
generated
vendored
12
vendor/github.com/Unknwon/i18n/Makefile
generated
vendored
|
@ -1,12 +0,0 @@
|
|||
.PHONY: build test bench vet
|
||||
|
||||
build: vet bench
|
||||
|
||||
test:
|
||||
go test -v -cover
|
||||
|
||||
bench:
|
||||
go test -v -cover -test.bench=. -test.benchmem
|
||||
|
||||
vet:
|
||||
go vet
|
136
vendor/github.com/Unknwon/i18n/README.md
generated
vendored
136
vendor/github.com/Unknwon/i18n/README.md
generated
vendored
|
@ -1,136 +0,0 @@
|
|||
i18n [](https://godoc.org/github.com/Unknwon/i18n) [](https://sourcegraph.com/github.com/Unknwon/i18n?badge)
|
||||
====
|
||||
|
||||
Package i18n is for app Internationalization and Localization.
|
||||
|
||||
## Introduction
|
||||
|
||||
This package provides multiple-language options to improve user experience. Sites like [Go Walker](http://gowalker.org) and [gogs.io](http://gogs.io) are using this module to implement Chinese and English user interfaces.
|
||||
|
||||
You can use following command to install this module:
|
||||
|
||||
go get github.com/Unknwon/i18n
|
||||
|
||||
## Usage
|
||||
|
||||
First of all, you have to import this package:
|
||||
|
||||
```go
|
||||
import "github.com/Unknwon/i18n"
|
||||
```
|
||||
|
||||
The format of locale files is very like INI format configuration file, which is basically key-value pairs. But this module has some improvements. Every language corresponding to a locale file, for example, under `conf/locale` folder of [gogsweb](https://github.com/gogits/gogsweb/tree/master/conf/locale), there are two files called `locale_en-US.ini` and `locale_zh-CN.ini`.
|
||||
|
||||
The name and extensions of locale files can be anything, but we strongly recommend you to follow the style of gogsweb.
|
||||
|
||||
## Minimal example
|
||||
|
||||
Here are two simplest locale file examples:
|
||||
|
||||
File `locale_en-US.ini`:
|
||||
|
||||
```ini
|
||||
hi = hello, %s
|
||||
bye = goodbye
|
||||
```
|
||||
|
||||
File `locale_zh-CN.ini`:
|
||||
|
||||
```ini
|
||||
hi = 您好,%s
|
||||
bye = 再见
|
||||
```
|
||||
|
||||
### Do Translation
|
||||
|
||||
There are two ways to do translation depends on which way is the best fit for your application or framework.
|
||||
|
||||
Directly use package function to translate:
|
||||
|
||||
```go
|
||||
i18n.Tr("en-US", "hi", "Unknwon")
|
||||
i18n.Tr("en-US", "bye")
|
||||
```
|
||||
|
||||
Or create a struct and embed it:
|
||||
|
||||
```go
|
||||
type MyController struct{
|
||||
// ...other fields
|
||||
i18n.Locale
|
||||
}
|
||||
|
||||
//...
|
||||
|
||||
func ... {
|
||||
c := &MyController{
|
||||
Locale: i18n.Locale{"en-US"},
|
||||
}
|
||||
_ = c.Tr("hi", "Unknwon")
|
||||
_ = c.Tr("bye")
|
||||
}
|
||||
```
|
||||
|
||||
Code above will produce correspondingly:
|
||||
|
||||
- English `en-US`:`hello, Unknwon`, `goodbye`
|
||||
- Chinese `zh-CN`:`您好,Unknwon`, `再见`
|
||||
|
||||
## Section
|
||||
|
||||
For different pages, one key may map to different values. Therefore, i18n module also uses the section feature of INI format configuration to achieve section.
|
||||
|
||||
For example, the key name is `about`, and we want to show `About` in the home page and `About Us` in about page. Then you can do following:
|
||||
|
||||
Content in locale file:
|
||||
|
||||
```ini
|
||||
about = About
|
||||
|
||||
[about]
|
||||
about = About Us
|
||||
```
|
||||
|
||||
Get `about` in home page:
|
||||
|
||||
```go
|
||||
i18n.Tr("en-US", "about")
|
||||
```
|
||||
|
||||
Get `about` in about page:
|
||||
|
||||
```go
|
||||
i18n.Tr("en-US", "about.about")
|
||||
```
|
||||
|
||||
### Ambiguity
|
||||
|
||||
Because dot `.` is sign of section in both [INI parser](https://github.com/go-ini/ini) and locale files, so when your key name contains `.` will cause ambiguity. At this point, you just need to add one more `.` in front of the key.
|
||||
|
||||
For example, the key name is `about.`, then we can use:
|
||||
|
||||
```go
|
||||
i18n.Tr("en-US", ".about.")
|
||||
```
|
||||
|
||||
to get expect result.
|
||||
|
||||
## Helper tool
|
||||
|
||||
Module i18n provides a command line helper tool beei18n for simplify steps of your development. You can install it as follows:
|
||||
|
||||
go get github.com/Unknwon/i18n/ui18n
|
||||
|
||||
### Sync locale files
|
||||
|
||||
Command `sync` allows you use a exist local file as the template to create or sync other locale files:
|
||||
|
||||
ui18n sync srouce_file.ini other1.ini other2.ini
|
||||
|
||||
This command can operate 1 or more files in one command.
|
||||
|
||||
## More information
|
||||
|
||||
- The first locale you load to the module is considered as **default locale**.
|
||||
- When matching non-default locale and didn't find the string, i18n will have a second try on default locale.
|
||||
- If i18n still cannot find string in the default locale, raw string will be returned. For instance, when the string is `hi` and it does not exist in locale file, simply return `hi` as output.
|
65
vendor/github.com/Unknwon/paginater/README.md
generated
vendored
65
vendor/github.com/Unknwon/paginater/README.md
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
Paginater [](https://drone.io/github.com/Unknwon/paginater/latest) [](http://gocover.io/github.com/Unknwon/paginater)
|
||||
=========
|
||||
|
||||
Package paginater is a helper module for custom pagination calculation.
|
||||
|
||||
## Installation
|
||||
|
||||
go get github.com/Unknwon/paginater
|
||||
|
||||
## Getting Started
|
||||
|
||||
The following code shows an example of how to use paginater:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/Unknwon/paginater"
|
||||
|
||||
func main() {
|
||||
// Arguments:
|
||||
// - Total number of rows
|
||||
// - Number of rows in one page
|
||||
// - Current page number
|
||||
// - Number of page links
|
||||
p := paginater.New(45, 10, 3, 3)
|
||||
|
||||
// Then use p as a template object named "Page" in "demo.html"
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
`demo.html`
|
||||
|
||||
```html
|
||||
{{if not .Page.IsFirst}}[First](1){{end}}
|
||||
{{if .Page.HasPrevious}}[Previous]({{.Page.Previous}}){{end}}
|
||||
|
||||
{{range .Page.Pages}}
|
||||
{{if eq .Num -1}}
|
||||
...
|
||||
{{else}}
|
||||
{{.Num}}{{if .IsCurrent}}(current){{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{if .Page.HasNext}}[Next]({{.Page.Next}}){{end}}
|
||||
{{if not .Page.IsLast}}[Last]({{.Page.TotalPages}}){{end}}
|
||||
```
|
||||
|
||||
Possible output:
|
||||
|
||||
```
|
||||
[First](1) [Previous](2) ... 2 3(current) 4 ... [Next](4) [Last](5)
|
||||
```
|
||||
|
||||
As you may guess, if the `Page` value is `-1`, you should print `...` in the HTML as common practice.
|
||||
|
||||
## Getting Help
|
||||
|
||||
- [API Documentation](https://gowalker.org/github.com/Unknwon/paginater)
|
||||
- [File An Issue](https://github.com/Unknwon/paginater/issues/new)
|
||||
|
||||
## License
|
||||
|
||||
This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text.
|
Loading…
Add table
Add a link
Reference in a new issue