1
0
mirror of https://github.com/gizak/termui.git synced 2025-04-30 13:49:00 +08:00

Switch to grafana/termui

This commit is contained in:
Justin Lei 2022-03-09 09:36:04 -08:00
parent f976fe697a
commit fe133cc058
31 changed files with 63 additions and 48 deletions

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -1,3 +1,4 @@
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -6,7 +7,7 @@ import (
"image" "image"
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -11,8 +12,8 @@ import (
"math" "math"
"time" "time"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {
@ -37,7 +38,7 @@ func main() {
} }
listData := []string{ listData := []string{
"[0] gizak/termui", "[0] grafana/termui",
"[1] editbox.go", "[1] editbox.go",
"[2] interrupt.go", "[2] interrupt.go",
"[3] keyboard.go", "[3] keyboard.go",

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -10,8 +11,8 @@ import (
"fmt" "fmt"
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -11,8 +12,8 @@ import (
"math" "math"
"time" "time"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -1,3 +1,4 @@
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -5,8 +6,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -18,8 +19,8 @@ import (
"os" "os"
"strings" "strings"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {
@ -22,7 +23,7 @@ func main() {
l := widgets.NewList() l := widgets.NewList()
l.Title = "List" l.Title = "List"
l.Rows = []string{ l.Rows = []string{
"[0] github.com/gizak/termui/v3", "[0] github.com/grafana/termui/v3",
"[1] [你好,世界](fg:blue)", "[1] [你好,世界](fg:blue)",
"[2] [こんにちは世界](fg:red)", "[2] [こんにちは世界](fg:red)",
"[3] [color](fg:white,bg:green) output", "[3] [color](fg:white,bg:green) output",

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -9,8 +9,8 @@ import (
"math/rand" "math/rand"
"time" "time"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
var run = true var run = true

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -10,8 +11,8 @@ import (
"log" "log"
"math" "math"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -9,8 +10,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
func main() { func main() {

View File

@ -5,8 +5,8 @@ package main
import ( import (
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
"github.com/gizak/termui/v3/widgets" "github.com/grafana/termui/v3/widgets"
) )
type nodeValue string type nodeValue string

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a MIT license that can // Use of this source code is governed by a MIT license that can
// be found in the LICENSE file. // be found in the LICENSE file.
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -10,7 +11,7 @@ import (
"fmt" "fmt"
"log" "log"
ui "github.com/gizak/termui/v3" ui "github.com/grafana/termui/v3"
) )
// logs all events to the termui window // logs all events to the termui window

View File

@ -3,7 +3,7 @@ package termui
import ( import (
"image" "image"
"github.com/gizak/termui/v3/drawille" "github.com/grafana/termui/v3/drawille"
) )
type Canvas struct { type Canvas struct {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/gizak/termui/v3 module github.com/grafana/termui/v3
go 1.15 go 1.15

View File

@ -10,7 +10,7 @@ import (
rw "github.com/mattn/go-runewidth" rw "github.com/mattn/go-runewidth"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type BarChart struct { type BarChart struct {

View File

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type Gauge struct { type Gauge struct {

View File

@ -8,7 +8,7 @@ import (
"image" "image"
"image/color" "image/color"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type Image struct { type Image struct {

View File

@ -9,7 +9,7 @@ import (
rw "github.com/mattn/go-runewidth" rw "github.com/mattn/go-runewidth"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type List struct { type List struct {

View File

@ -7,7 +7,7 @@ package widgets
import ( import (
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type Paragraph struct { type Paragraph struct {

View File

@ -4,7 +4,7 @@ import (
"image" "image"
"math" "math"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
const ( const (

View File

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
// Plot has two modes: line(default) and scatter. // Plot has two modes: line(default) and scatter.

View File

@ -7,7 +7,7 @@ package widgets
import ( import (
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
// Sparkline is like: ▅▆▂▂▅▇▂▂▃▆▆▆▅▃. The data points should be non-negative integers. // Sparkline is like: ▅▆▂▂▅▇▂▂▃▆▆▆▅▃. The data points should be non-negative integers.

View File

@ -10,7 +10,7 @@ import (
rw "github.com/mattn/go-runewidth" rw "github.com/mattn/go-runewidth"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
type StackedBarChart struct { type StackedBarChart struct {

View File

@ -7,7 +7,7 @@ package widgets
import ( import (
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
/*Table is like: /*Table is like:

View File

@ -7,7 +7,7 @@ package widgets
import ( import (
"image" "image"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
) )
// TabPane is a renderable widget which can be used to conditionally render certain tabs/views. // TabPane is a renderable widget which can be used to conditionally render certain tabs/views.

View File

@ -5,7 +5,7 @@ import (
"image" "image"
"strings" "strings"
. "github.com/gizak/termui/v3" . "github.com/grafana/termui/v3"
rw "github.com/mattn/go-runewidth" rw "github.com/mattn/go-runewidth"
) )