Skip to content

Commit 9c7bd91

Browse files
authored
Use the terminal/ansipixels that has our moved to there table widget (#23)
* Use the terminal/ansipixels that has our moved to there table widget * add dependabot
1 parent 86d141e commit 9c7bd91

File tree

6 files changed

+40
-947
lines changed

6 files changed

+40
-947
lines changed

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod"
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
groups:
13+
"fortio and grol":
14+
patterns:
15+
- "fortio.org/*"
16+
- "grol.io/*"
17+
"go x":
18+
patterns:
19+
- "golang.org/x/*"
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
schedule:
23+
# Check for updates to GitHub Actions every week
24+
interval: "weekly"

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module fortio.org/tsync
33
go 1.24.0
44

55
require (
6-
fortio.org/cli v1.12.2
7-
fortio.org/log v1.18.1
6+
fortio.org/cli v1.12.3
7+
fortio.org/log v1.18.3
88
fortio.org/smap v1.1.0
9-
fortio.org/terminal v0.60.2
9+
fortio.org/terminal v0.61.0
1010
golang.org/x/net v0.46.0
1111
)
1212

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
fortio.org/cli v1.12.2 h1:D0n52GvG+iCECGmUGiw7WBy+qQSLAWseejpa6L/9Ibo=
2-
fortio.org/cli v1.12.2/go.mod h1:b2fRQzWjdgYAqIsaEhGslsCH0P3u/037BviWbclO2x8=
3-
fortio.org/log v1.18.1 h1:rqzz/57dGhDg3GAn5yQxVgh5JPQE1OAnNGS58S6dQOI=
4-
fortio.org/log v1.18.1/go.mod h1:vqpyEZd/TP4xO5eAHQaa4buDZDCn1AxCAV+wl3eaTec=
1+
fortio.org/cli v1.12.3 h1:PoqlAgkClqEv9Ztj4HK/J55UodnTc3Z+Ignm0ggyei4=
2+
fortio.org/cli v1.12.3/go.mod h1:miR0uK+QAJLctpMGeeYvuS/8SldOVJ5jyDl8d+bes8Q=
3+
fortio.org/log v1.18.3 h1:2kwEUise3faY4OouueQ/1tC+75Y2YGJjJaX2/ECmu4I=
4+
fortio.org/log v1.18.3/go.mod h1:vqpyEZd/TP4xO5eAHQaa4buDZDCn1AxCAV+wl3eaTec=
55
fortio.org/safecast v1.2.0 h1:ckQJNenMJHycqPsi/QrzA4EUX5WQkyd+hGO4mxt/a8w=
66
fortio.org/safecast v1.2.0/go.mod h1:xZmcPk3vi4kuUFf+tq4SvnlVdwViqf6ZSZl91Jr9Jdg=
77
fortio.org/smap v1.1.0 h1:IWTQaMejps/itsNHc2CcMQF0slQBWHzRIlAa0TJFQV0=
88
fortio.org/smap v1.1.0/go.mod h1:8pFdFsSNOZ+RuFd7uUqU8EBO0F5yEYPNLkBUPP68FsA=
99
fortio.org/struct2env v0.4.2 h1:Xh7HlS9vf2ZdRvRfmoGIasNDO8t6z36M713utVODRCo=
1010
fortio.org/struct2env v0.4.2/go.mod h1:lENUe70UwA1zDUCX+8AsO663QCFqYaprk5lnPhjD410=
11-
fortio.org/terminal v0.60.2 h1:9NhYHHeuZJ/f5LdW0e8Nq8s4wVZHdkn0cNCobgs/sXU=
12-
fortio.org/terminal v0.60.2/go.mod h1:+U/5kCz/UjZe5P8ccvrp3imisyB26DhKdYd0ejErKOs=
11+
fortio.org/terminal v0.61.0 h1:ObvLvzx1iM7zpb2XUvyRnnJu1MUNmdRi/928yYSI2+A=
12+
fortio.org/terminal v0.61.0/go.mod h1:pZOEzxnzxugCTBCfKB5YYi3L0tygtXL/gvyzbOXIrAU=
1313
fortio.org/version v1.0.4 h1:FWUMpJ+hVTNc4RhvvOJzb0xesrlRmG/a+D6bjbQ4+5U=
1414
fortio.org/version v1.0.4/go.mod h1:2JQp9Ax+tm6QKiGuzR5nJY63kFeANcgrZ0osoQFDVm0=
1515
github.com/jbuchbinder/gopnm v0.0.0-20220507095634-e31f54490ce0 h1:9GwwkVzUn1vRWAQ8GRu7UOaoM+FZGnvw88DsjyiqfXc=

main.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"fortio.org/smap"
1515
"fortio.org/terminal/ansipixels"
1616
"fortio.org/terminal/ansipixels/tcolor"
17-
"fortio.org/tsync/table"
1817
"fortio.org/tsync/tcrypto"
1918
"fortio.org/tsync/tsnet"
2019
)
@@ -49,12 +48,12 @@ func LoadIdentity() (*tcrypto.Identity, error) {
4948
return id, nil
5049
}
5150

52-
var alignment = []table.Alignment{
53-
table.Right, // Id
54-
table.Center, // Name
55-
table.Left, // Ip
56-
table.Right, // Port
57-
table.Right, // Human Hash
51+
var alignment = []ansipixels.Alignment{
52+
ansipixels.Right, // Id
53+
ansipixels.Center, // Name
54+
ansipixels.Left, // Ip
55+
ansipixels.Right, // Port
56+
ansipixels.Right, // Human Hash
5857
}
5958

6059
func PeerLine(idx int, peer tsnet.Peer, peerData tsnet.PeerData) []string {
@@ -223,7 +222,7 @@ func Main() int {
223222
lines = append(lines, PeerLine(idx, kv.Key, kv.Value))
224223
idx++
225224
}
226-
tableWidth = table.WriteTable(ap, 0, alignment, 1, lines, table.BorderOuterColumns)
225+
tableWidth = ap.WriteTable(0, alignment, 1, lines, ansipixels.BorderOuterColumns)
227226
ap.RestoreCursorPos()
228227
ap.EndSyncMode()
229228
}

table/table.go

Lines changed: 0 additions & 232 deletions
This file was deleted.

0 commit comments

Comments
 (0)