widget: fix build for go1.17 go.mod specifies 1.18, due to go.mod behavior and to avoid some issues with updating the dependencies. However, we can still support older go version, as long as it compiles with the older version. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
1 files changed, 2 insertions(+), 4 deletions(-) M widget/editor.go
M widget/editor.go => widget/editor.go +2 -4
@@ 24,8 24,6 @@ import ( "gioui.org/op/clip" "gioui.org/text" "gioui.org/unit" "golang.org/x/exp/constraints" ) @@ // Editor implements an editable and scrollable text area. 997,14 995,14 @@ func max(a, b int) int { return b } func min[T constraints.Ordered](a, b T) T { func min(a, b int) int { if a < b { return a } return b } func abs[T constraints.Signed](n T) T { func abs(n int) int { if n < 0 { return -n }