From dada0699b617fea043c40076e7393a107ea2c780 Mon Sep 17 00:00:00 2001 From: gizak Date: Tue, 26 Jan 2016 20:45:18 -0500 Subject: [PATCH] Update doc string --- _example/barchart.go | 2 +- _example/dashboard.go | 2 +- _example/gauge.go | 2 +- _example/grid.go | 2 +- _example/linechart.go | 2 +- _example/list.go | 2 +- _example/mbarchart.go | 2 +- _example/par.go | 2 +- _example/sparklines.go | 2 +- _example/tabs.go | 4 ++++ _example/theme.go | 2 +- _example/ttop.go | 4 ++++ _extra/tabpane.go | 4 ++++ barchart.go | 2 +- block.go | 2 +- block_common.go | 2 +- block_test.go | 4 ++++ block_windows.go | 2 +- buffer.go | 2 +- buffer_test.go | 4 ++++ canvas.go | 2 +- canvas_test.go | 4 ++++ config | 26 ++++++++++++++++++++++++++ debug/debuger.go | 4 ++++ doc.go | 2 +- events.go | 6 +----- events_test.go | 6 +----- gauge.go | 2 +- grid.go | 2 +- grid_test.go | 2 +- helper.go | 2 +- helper_test.go | 2 +- linechart.go | 2 +- linechart_others.go | 2 +- linechart_windows.go | 2 +- list.go | 2 +- mbarchart.go | 2 +- par.go | 2 +- par_test.go | 4 ++++ pos.go | 4 ++++ pos_test.go | 4 ++++ render.go | 2 +- sparkline.go | 2 +- test/runtest.go | 4 ++++ textbuilder.go | 4 ++++ textbuilder_test.go | 4 ++++ theme.go | 2 +- theme_test.go | 4 ++++ widget.go | 4 ++++ 49 files changed, 119 insertions(+), 41 deletions(-) create mode 100755 config diff --git a/_example/barchart.go b/_example/barchart.go index 30993d3..6a94091 100644 --- a/_example/barchart.go +++ b/_example/barchart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/dashboard.go b/_example/dashboard.go index dadea65..95a23e9 100644 --- a/_example/dashboard.go +++ b/_example/dashboard.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/gauge.go b/_example/gauge.go index ce2c22f..dcce7b0 100644 --- a/_example/gauge.go +++ b/_example/gauge.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/grid.go b/_example/grid.go index 0c97ab9..d4078c5 100644 --- a/_example/grid.go +++ b/_example/grid.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/linechart.go b/_example/linechart.go index 1749e7b..68573c8 100644 --- a/_example/linechart.go +++ b/_example/linechart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/list.go b/_example/list.go index e1914c6..2520b98 100644 --- a/_example/list.go +++ b/_example/list.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/mbarchart.go b/_example/mbarchart.go index 0fed643..c65fc59 100644 --- a/_example/mbarchart.go +++ b/_example/mbarchart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/par.go b/_example/par.go index f8539fe..827b31b 100644 --- a/_example/par.go +++ b/_example/par.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/sparklines.go b/_example/sparklines.go index 4b3a5b6..dc486f4 100644 --- a/_example/sparklines.go +++ b/_example/sparklines.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/tabs.go b/_example/tabs.go index ae397c4..1bfe3d5 100644 --- a/_example/tabs.go +++ b/_example/tabs.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + // +build ignore package main diff --git a/_example/theme.go b/_example/theme.go index 30c51a3..0c36cec 100644 --- a/_example/theme.go +++ b/_example/theme.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/_example/ttop.go b/_example/ttop.go index a640c3b..73c9b85 100644 --- a/_example/ttop.go +++ b/_example/ttop.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + // +build ignore package main diff --git a/_extra/tabpane.go b/_extra/tabpane.go index dbfefe6..7647238 100644 --- a/_extra/tabpane.go +++ b/_extra/tabpane.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package extra import ( diff --git a/barchart.go b/barchart.go index ed59184..980e958 100644 --- a/barchart.go +++ b/barchart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/block.go b/block.go index fabd098..418738c 100644 --- a/block.go +++ b/block.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/block_common.go b/block_common.go index ed0f6a6..0f972cb 100644 --- a/block_common.go +++ b/block_common.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/block_test.go b/block_test.go index 9be8aa7..5b0ce92 100644 --- a/block_test.go +++ b/block_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import ( diff --git a/block_windows.go b/block_windows.go index dd39019..4dbc017 100644 --- a/block_windows.go +++ b/block_windows.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/buffer.go b/buffer.go index 6eabc02..60e7786 100644 --- a/buffer.go +++ b/buffer.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/buffer_test.go b/buffer_test.go index 8fbf812..5786157 100644 --- a/buffer_test.go +++ b/buffer_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import ( diff --git a/canvas.go b/canvas.go index 9422f5e..4173780 100644 --- a/canvas.go +++ b/canvas.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/canvas_test.go b/canvas_test.go index a955587..d059174 100644 --- a/canvas_test.go +++ b/canvas_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + // +build ignore package termui diff --git a/config b/config new file mode 100755 index 0000000..18fd6a4 --- /dev/null +++ b/config @@ -0,0 +1,26 @@ +#!/usr/bin/env perl6 + +use v6; + +my $copyright = '// Copyright 2016 Zack Guo . 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, $_; + } + } +} diff --git a/debug/debuger.go b/debug/debuger.go index ac86226..f723b96 100644 --- a/debug/debuger.go +++ b/debug/debuger.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package debug import ( diff --git a/doc.go b/doc.go index 43f886f..b80e464 100644 --- a/doc.go +++ b/doc.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/events.go b/events.go index 22e7193..177bbb4 100644 --- a/events.go +++ b/events.go @@ -1,10 +1,6 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. -// -// Portions of this file uses [termbox-go](https://github.com/nsf/termbox-go/blob/54b74d087b7c397c402d0e3b66d2ccb6eaf5c2b4/api_common.go) -// by [authors](https://github.com/nsf/termbox-go/blob/master/AUTHORS) -// under [license](https://github.com/nsf/termbox-go/blob/master/LICENSE) package termui diff --git a/events_test.go b/events_test.go index c85634a..888559a 100644 --- a/events_test.go +++ b/events_test.go @@ -1,10 +1,6 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. -// -// Portions of this file uses [termbox-go](https://github.com/nsf/termbox-go/blob/54b74d087b7c397c402d0e3b66d2ccb6eaf5c2b4/api_common.go) -// by [authors](https://github.com/nsf/termbox-go/blob/master/AUTHORS) -// under [license](https://github.com/nsf/termbox-go/blob/master/LICENSE) package termui diff --git a/gauge.go b/gauge.go index f2753fe..244d299 100644 --- a/gauge.go +++ b/gauge.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/grid.go b/grid.go index 264b760..364442e 100644 --- a/grid.go +++ b/grid.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/grid_test.go b/grid_test.go index 9829586..07358b0 100644 --- a/grid_test.go +++ b/grid_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/helper.go b/helper.go index 840c9bb..6690e7f 100644 --- a/helper.go +++ b/helper.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/helper_test.go b/helper_test.go index 5d277de..bce952c 100644 --- a/helper_test.go +++ b/helper_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/linechart.go b/linechart.go index 0689487..f282914 100644 --- a/linechart.go +++ b/linechart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/linechart_others.go b/linechart_others.go index 8911873..7e2e66b 100644 --- a/linechart_others.go +++ b/linechart_others.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/linechart_windows.go b/linechart_windows.go index 9f9a5e9..1478b5c 100644 --- a/linechart_windows.go +++ b/linechart_windows.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/list.go b/list.go index 50361f2..670015f 100644 --- a/list.go +++ b/list.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/mbarchart.go b/mbarchart.go index c9d0c44..231de27 100644 --- a/mbarchart.go +++ b/mbarchart.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/par.go b/par.go index 03a3c97..c01bd00 100644 --- a/par.go +++ b/par.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/par_test.go b/par_test.go index e689273..6ecb36d 100644 --- a/par_test.go +++ b/par_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import "testing" diff --git a/pos.go b/pos.go index 96a2ced..2046dce 100644 --- a/pos.go +++ b/pos.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import "image" diff --git a/pos_test.go b/pos_test.go index 0454345..a54522a 100644 --- a/pos_test.go +++ b/pos_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import ( diff --git a/render.go b/render.go index 4670f48..36544f0 100644 --- a/render.go +++ b/render.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/sparkline.go b/sparkline.go index 02a1034..b438941 100644 --- a/sparkline.go +++ b/sparkline.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/test/runtest.go b/test/runtest.go index 97caf83..99794c4 100644 --- a/test/runtest.go +++ b/test/runtest.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package main import ( diff --git a/textbuilder.go b/textbuilder.go index f55b113..6ff6d21 100644 --- a/textbuilder.go +++ b/textbuilder.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import ( diff --git a/textbuilder_test.go b/textbuilder_test.go index 93aa62e..71574e1 100644 --- a/textbuilder_test.go +++ b/textbuilder_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import "testing" diff --git a/theme.go b/theme.go index 7ee1fbb..c3ccda5 100644 --- a/theme.go +++ b/theme.go @@ -1,4 +1,4 @@ -// Copyright 2015 Zack Guo . All rights reserved. +// Copyright 2016 Zack Guo . All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. diff --git a/theme_test.go b/theme_test.go index b488a09..a6a99b3 100644 --- a/theme_test.go +++ b/theme_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import "testing" diff --git a/widget.go b/widget.go index df15b5d..35cf143 100644 --- a/widget.go +++ b/widget.go @@ -1,3 +1,7 @@ +// Copyright 2016 Zack Guo . All rights reserved. +// Use of this source code is governed by a MIT license that can +// be found in the LICENSE file. + package termui import (