From a9cba9b6e60ff4aec081d48b0d86ec175c3e8e99 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 21 Dec 2022 12:50:01 +0100 Subject: format: add utf-8 aware truncate head function The runewidth module only allows truncating at the end of strings. Add a function to truncate at the beginning. It will be used for the table widget in the next commit. Signed-off-by: Robin Jarry Acked-by: Tim Culverhouse --- go.mod | 1 + 1 file changed, 1 insertion(+) (limited to 'go.mod') diff --git a/go.mod b/go.mod index 466c1709..10421e9a 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/miolini/datacounter v1.0.2 github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 + github.com/rivo/uniseg v0.2.0 github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab github.com/stretchr/testify v1.8.0 github.com/syndtr/goleveldb v1.0.0 -- cgit