diff options
author | silverwind <me@silverwind.io> | 2023-07-04 20:36:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 18:36:08 +0000 |
commit | 88f835192d1a554d233b0ec4daa33276b7eb2910 (patch) | |
tree | 438140c295791e64a3b78dcfeae57701bcf296c3 /modules/charset/invisible/generate.go | |
parent | 00dbba7f4266032a2b91b760e7c611950ffad096 (diff) | |
download | gitea-88f835192d1a554d233b0ec4daa33276b7eb2910.tar.gz gitea-88f835192d1a554d233b0ec4daa33276b7eb2910.zip |
Replace `interface{}` with `any` (#25686)
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.
Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
Diffstat (limited to 'modules/charset/invisible/generate.go')
-rw-r--r-- | modules/charset/invisible/generate.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/charset/invisible/generate.go b/modules/charset/invisible/generate.go index 9dfc253333..bd57dd6c4d 100644 --- a/modules/charset/invisible/generate.go +++ b/modules/charset/invisible/generate.go @@ -52,7 +52,7 @@ Usage: %[1]s [-v] [-o output.go] } } -func runTemplate(t *template.Template, filename string, data interface{}) error { +func runTemplate(t *template.Template, filename string, data any) error { buf := bytes.NewBuffer(nil) if err := t.Execute(buf, data); err != nil { return fmt.Errorf("unable to execute template: %w", err) @@ -105,17 +105,17 @@ var InvisibleRanges = &unicode.RangeTable{ } `)) -func logf(format string, args ...interface{}) { +func logf(format string, args ...any) { fmt.Fprintf(os.Stderr, format+"\n", args...) } -func verbosef(format string, args ...interface{}) { +func verbosef(format string, args ...any) { if verbose { logf(format, args...) } } -func fatalf(format string, args ...interface{}) { +func fatalf(format string, args ...any) { logf("fatal: "+format+"\n", args...) os.Exit(1) } |