diff options
author | Eng Zer Jun <engzerjun@gmail.com> | 2024-04-07 23:24:10 +0800 |
---|---|---|
committer | Eng Zer Jun <engzerjun@gmail.com> | 2024-04-07 23:24:10 +0800 |
commit | f933a2f7ec2e0ab280d41a7d1582729c1acab92b (patch) | |
tree | 5a71a868efe921c21302d854cdae2f1845c384f5 /pkg/gui/global_handlers.go | |
parent | ed61b9a7f2e2ca07643ded8e33a6d38e57f32b22 (diff) |
Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189458a7f0e63c2e9cac8334694a3d545. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.
Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index c64a20a9e..96132fea7 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -145,7 +145,7 @@ func (gui *Gui) handleCopySelectedSideContextItemToClipboardWithTruncation(maxWi } if maxWidth > 0 { - itemId = itemId[:utils.Min(len(itemId), maxWidth)] + itemId = itemId[:min(len(itemId), maxWidth)] } gui.c.LogAction(gui.c.Tr.Actions.CopyToClipboard) |