vendor: update all dependencies except Azure SDK

The Azure SDK doesn't support Go 1.5 anymore. We can't upgrade it until
Go 1.8 comes out.
This commit is contained in:
Felix Lange
2017-01-10 19:33:17 +01:00
parent 02b67558e8
commit d78f9b834a
130 changed files with 14052 additions and 1035 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
@ -46,7 +46,7 @@ func (b Buffer) Bounds() image.Rectangle {
y0 = p.Y
}
}
return image.Rect(x0, y0, x1, y1)
return image.Rect(x0, y0, x1+1, y1+1)
}
// SetArea assigns a new rect area to Buffer b.
@ -56,7 +56,7 @@ func (b *Buffer) SetArea(r image.Rectangle) {
}
// Sync sets drawing area to the buffer's bound
func (b Buffer) Sync() {
func (b *Buffer) Sync() {
b.SetArea(b.Bounds())
}

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,26 +0,0 @@
#!/usr/bin/env perl6
use v6;
my $copyright = '// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
';
sub MAIN('update-docstr', Str $srcp) {
if $srcp.IO.f {
$_ = $srcp.IO.slurp;
if m/^ \/\/\s Copyright .+? \n\n/ {
unless ~$/ eq $copyright {
s/^ \/\/\s Copyright .+? \n\n /$copyright/;
spurt $srcp, $_;
say "[updated] doc string for:"~$srcp;
}
} else {
say "[added] doc string for "~$srcp~" (no match found)";
$_ = $copyright ~ $_;
spurt $srcp, $_;
}
}
}

79
vendor/github.com/gizak/termui/config.py generated vendored Normal file
View File

@ -0,0 +1,79 @@
#!/usr/bin/env python3
# use v6;
#
# my $copyright = '// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
# // Use of this source code is governed by a MIT license that can
# // be found in the LICENSE file.
#
# ';
#
# sub MAIN('update-docstr', Str $srcp) {
# if $srcp.IO.f {
# $_ = $srcp.IO.slurp;
# if m/^ \/\/\s Copyright .+? \n\n/ {
# unless ~$/ eq $copyright {
# s/^ \/\/\s Copyright .+? \n\n /$copyright/;
# spurt $srcp, $_;
# say "[updated] doc string for:"~$srcp;
# }
# } else {
# say "[added] doc string for "~$srcp~" (no match found)";
# $_ = $copyright ~ $_;
# spurt $srcp, $_;
# }
# }
# }
import re
import os
import io
copyright = """// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
"""
exclude_dirs = [".git", "_docs"]
exclude_files = []
include_dirs = [".", "debug", "extra", "test", "_example"]
def is_target(fpath):
if os.path.splitext(fpath)[-1] == ".go":
return True
return False
def update_copyright(fpath):
print("processing " + fpath)
f = io.open(fpath, 'r', encoding='utf-8')
fstr = f.read()
f.close()
# remove old
m = re.search('^// Copyright .+?\r?\n\r?\n', fstr, re.MULTILINE|re.DOTALL)
if m:
fstr = fstr[m.end():]
# add new
fstr = copyright + fstr
f = io.open(fpath, 'w',encoding='utf-8')
f.write(fstr)
f.close()
def main():
for d in include_dirs:
files = [
os.path.join(d, f) for f in os.listdir(d)
if os.path.isfile(os.path.join(d, f))
]
for f in files:
if is_target(f):
update_copyright(f)
if __name__ == '__main__':
main()

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,14 +1,30 @@
hash: 67a478802ee1d122cf1df063c52458d074864900c96a5cc25dc6be4b7638eb1c
updated: 2016-04-06T21:16:00.849048757-04:00
hash: 7a754ba100256404a978b2fc8738aee337beb822458e4b6060399fb89ebd215c
updated: 2016-11-03T17:39:24.323773674-04:00
imports:
- name: github.com/maruel/panicparse
version: ad661195ed0e88491e0f14be6613304e3b1141d6
subpackages:
- stack
- name: github.com/mattn/go-runewidth
version: d6bea18f789704b5f83375793155289da36a3c7f
version: 737072b4e32b7a5018b4a7125da8d12de90e8045
- name: github.com/mitchellh/go-wordwrap
version: ad45545899c7b13c020ea92b2072220eefad42b8
- name: github.com/nsf/termbox-go
version: 362329b0aa6447eadd52edd8d660ec1dff470295
version: b6acae516ace002cb8105a89024544a1480655a5
- name: golang.org/x/net
version: af4fee9d05b66edc24197d189e6118f8ebce8c2b
version: 569280fa63be4e201b975e5411e30a92178f0118
subpackages:
- websocket
devImports: []
testImports:
- name: github.com/davecgh/go-spew
version: 346938d642f2ec3594ed81d874461961cd0faa76
subpackages:
- spew
- name: github.com/pmezard/go-difflib
version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
subpackages:
- difflib
- name: github.com/stretchr/testify
version: 976c720a22c8eb4eb6a0b4348ad85ad12491a506
subpackages:
- assert

View File

@ -6,3 +6,4 @@ import:
- package: golang.org/x/net
subpackages:
- websocket
- package: github.com/maruel/panicparse

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
@ -6,9 +6,19 @@ package termui
import (
"image"
"io"
"sync"
"time"
"fmt"
"os"
"runtime/debug"
"bytes"
"github.com/maruel/panicparse/stack"
tm "github.com/nsf/termbox-go"
)
@ -89,7 +99,26 @@ func TermHeight() int {
// Render renders all Bufferer in the given order from left to right,
// right could overlap on left ones.
func render(bs ...Bufferer) {
defer func() {
if e := recover(); e != nil {
Close()
fmt.Fprintf(os.Stderr, "Captured a panic(value=%v) when rendering Bufferer. Exit termui and clean terminal...\nPrint stack trace:\n\n", e)
//debug.PrintStack()
gs, err := stack.ParseDump(bytes.NewReader(debug.Stack()), os.Stderr)
if err != nil {
debug.PrintStack()
os.Exit(1)
}
p := &stack.Palette{}
buckets := stack.SortBuckets(stack.Bucketize(gs, stack.AnyValue))
srcLen, pkgLen := stack.CalcLengths(buckets, false)
for _, bucket := range buckets {
io.WriteString(os.Stdout, p.BucketHeader(&bucket, false, len(buckets) > 1))
io.WriteString(os.Stdout, p.StackLines(&bucket.Signature, srcLen, pkgLen, false))
}
os.Exit(1)
}
}()
for _, b := range bs {
buf := b.Buffer()

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

170
vendor/github.com/gizak/termui/table.go generated vendored Normal file
View File

@ -0,0 +1,170 @@
package termui
import "strings"
/*
table := termui.NewTable()
table.Rows = rows
table.FgColor = termui.ColorWhite
table.BgColor = termui.ColorDefault
table.Height = 7
table.Width = 62
table.Y = 0
table.X = 0
table.Border = true
*/
type Table struct {
Block
Rows [][]string
CellWidth []int
FgColor Attribute
BgColor Attribute
FgColors []Attribute
BgColors []Attribute
Seperator bool
TextAlign Align
}
func NewTable() *Table {
table := &Table{Block: *NewBlock()}
table.FgColor = ColorWhite
table.BgColor = ColorDefault
table.Seperator = true
return table
}
func (table *Table) Analysis() {
length := len(table.Rows)
if length < 1 {
return
}
if len(table.FgColors) == 0 {
table.FgColors = make([]Attribute, len(table.Rows))
}
if len(table.BgColors) == 0 {
table.BgColors = make([]Attribute, len(table.Rows))
}
row_width := len(table.Rows[0])
cellWidthes := make([]int, row_width)
for index, row := range table.Rows {
for i, str := range row {
if cellWidthes[i] < len(str) {
cellWidthes[i] = len(str)
}
}
if table.FgColors[index] == 0 {
table.FgColors[index] = table.FgColor
}
if table.BgColors[index] == 0 {
table.BgColors[index] = table.BgColor
}
}
table.CellWidth = cellWidthes
//width_sum := 2
//for i, width := range cellWidthes {
// width_sum += (width + 2)
// for u, row := range table.Rows {
// switch table.TextAlign {
// case "right":
// row[i] = fmt.Sprintf(" %*s ", width, table.Rows[u][i])
// case "center":
// word_width := len(table.Rows[u][i])
// offset := (width - word_width) / 2
// row[i] = fmt.Sprintf(" %*s ", width, fmt.Sprintf("%-*s", offset+word_width, table.Rows[u][i]))
// default: // left
// row[i] = fmt.Sprintf(" %-*s ", width, table.Rows[u][i])
// }
// }
//}
//if table.Width == 0 {
// table.Width = width_sum
//}
}
func (table *Table) SetSize() {
length := len(table.Rows)
if table.Seperator {
table.Height = length*2 + 1
} else {
table.Height = length + 2
}
table.Width = 2
if length != 0 {
for _, cell_width := range table.CellWidth {
table.Width += cell_width + 3
}
}
}
func (table *Table) CalculatePosition(x int, y int, x_coordinate *int, y_coordibate *int, cell_beginning *int) {
if table.Seperator {
*y_coordibate = table.innerArea.Min.Y + y*2
} else {
*y_coordibate = table.innerArea.Min.Y + y
}
if x == 0 {
*cell_beginning = table.innerArea.Min.X
} else {
*cell_beginning += table.CellWidth[x-1] + 3
}
switch table.TextAlign {
case AlignRight:
*x_coordinate = *cell_beginning + (table.CellWidth[x] - len(table.Rows[y][x])) + 2
case AlignCenter:
*x_coordinate = *cell_beginning + (table.CellWidth[x]-len(table.Rows[y][x]))/2 + 2
default:
*x_coordinate = *cell_beginning + 2
}
}
func (table *Table) Buffer() Buffer {
buffer := table.Block.Buffer()
table.Analysis()
pointer_x := table.innerArea.Min.X + 2
pointer_y := table.innerArea.Min.Y
border_pointer_x := table.innerArea.Min.X
for y, row := range table.Rows {
for x, cell := range row {
table.CalculatePosition(x, y, &pointer_x, &pointer_y, &border_pointer_x)
backgraound := DefaultTxBuilder.Build(strings.Repeat(" ", table.CellWidth[x]+3), table.BgColors[y], table.BgColors[y])
cells := DefaultTxBuilder.Build(cell, table.FgColors[y], table.BgColors[y])
for i, back := range backgraound {
buffer.Set(border_pointer_x+i, pointer_y, back)
}
coordinate_x := pointer_x
for _, printer := range cells {
buffer.Set(coordinate_x, pointer_y, printer)
coordinate_x += printer.Width()
}
if x != 0 {
devidors := DefaultTxBuilder.Build("|", table.FgColors[y], table.BgColors[y])
for _, devidor := range devidors {
buffer.Set(border_pointer_x, pointer_y, devidor)
}
}
}
if table.Seperator {
border := DefaultTxBuilder.Build(strings.Repeat("─", table.Width-2), table.FgColor, table.BgColor)
for i, cell := range border {
buffer.Set(i+1, pointer_y+1, cell)
}
}
}
return buffer
}

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.

View File

@ -1,4 +1,4 @@
// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Copyright 2016 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.