Commit Graph

13 Commits

Author SHA1 Message Date
Qi Xiao
51e4d97568 interface{} -> any now that Elvish requires Go 1.18. 2022-03-20 16:17:19 +00:00
Kurtis Rader
ff9341eb91 More error deduplication 2021-06-06 14:54:47 +01:00
Qi Xiao
9cd90c49bb Minor fixup for #1274. 2021-05-02 00:22:28 +01:00
Kurtis Rader
1e0885310e Include name in error msg setting a readonly var
When attempting to update a read-only var return an error struct rather
than a simple string (i.e., a Go `error` type).  This makes it possible
to include the var name in the error message.  This builds on commit
a33ecb2d that highlights the offending var name in the stack trace but
does not include the var name in the error message. With this change the
error message includes the offending var name.

Related #255
2021-03-26 18:38:22 -07:00
Qi Xiao
196eea21d4 Change module import path to src.elv.sh 2021-01-27 01:30:25 +00:00
Qi Xiao
6dd122107c pkg: Move multierror.go from util/ to diag/. 2020-09-03 05:12:55 +01:00
Qi Xiao
1c8af687fe pkg/diag: Do not depend implicitly on os.Stderr. 2020-04-14 22:35:02 +01:00
Qi Xiao
3037f6c8bf pkg/util: Move the wcwidth utilities to a new package, and add more tests.
This addresses #944.
2020-04-06 12:00:01 +01:00
Qi Xiao
c05f11d3dc [cleanup] pkg/diag: PPrint -> Show. 2020-03-31 00:27:08 +01:00
Qi Xiao
d44363d8cd [cleanup]: Move pkg/util/pprinter.go to pkg/diag. 2020-03-30 23:48:22 +01:00
Qi Xiao
9bebf49b40 pkg/diag: Let NewContext accept a Ranging. 2020-03-28 22:12:42 +00:00
Qi Xiao
d6832c0ae7 pkg/diag: Add two convinient constructors for Ranging. 2020-03-28 21:33:55 +00:00
Qi Xiao
e45fdf7228 Move all libraries to new pkg/. 2019-12-23 20:00:59 +00:00