Re: [go-nuts] Tests skipping

2020-03-23 Thread Brian Candler
On Monday, 23 March 2020 06:37:45 UTC, Shane H wrote: > > The output of the go test is > TestQuoteDate (skipping) // or words to that effect > > Could you copy-paste the exact, verbatim output of the test run when it does this? With a few lines either side for context? -- You received this

Re: [go-nuts] libgo is more fast that grouting.

2020-03-23 Thread Brian Candler
The best approach is not to feed the troll. Let's all just abandon this thread now. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] Re: Crud Example

2020-03-22 Thread Brian Candler
I refer the honourable gentleman to the reply I gave some moments ago: https://groups.google.com/d/msg/golang-nuts/utkLBd5wU7o/OG0T0oqBBAAJ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Re: Mysterious crypto/opengpg: invalid signature: hash tag doesn’t match

2020-03-18 Thread Brian Candler
You didn't include the newline in the plaintext. Add "\n" to the end of var text, and it is happy. https://play.golang.org/p/DG7GajcTuHx -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Re: Go lang

2020-03-18 Thread Brian Candler
It sounds like you have Tomcat running, and it's listening on port 8080. If that's the case, then your go program will be unable to bind a listening socket on port 8080 at the same time. Either modify your go program to bind to a different port; or stop Tomcat before starting your go program;

[go-nuts] Re: Could not attach to pid:#### this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope

2020-03-13 Thread Brian Candler
On Friday, 13 March 2020 07:45:57 UTC, Anjana Prabhakar wrote: > > Can someone help me out how to proceed further. > > Erm, why don't you try writing "0" to /proc/sys/kernel/yama/ptrace_scope ? echo "0" >/proc/sys/kernel/yama/ptrace_scope -- You received this message because you are subscribed

[go-nuts] Re: An important proposal will fail without your support

2020-03-10 Thread Brian Candler
Sorry, somehow I scrolled over the definition of func #gettext. So: this function emits literal source code text to be inserted into the compilation point. There are interesting semantic implications here: the args can't be evaluated at compile time (unless they are constant expressions), but

[go-nuts] Re: An important proposal will fail without your support

2020-03-10 Thread Brian Candler
On Tuesday, 10 March 2020 17:31:33 UTC, Jon Perryman wrote: > > If proposal https://github.com/golang/go/issues/37292 fails, everyone > will lose out on a great opportunity. > This is not a proposal, as it specifies neither the syntax nor the semantics. I therefore down-voted on that basis

[go-nuts] Re: I'm writing my website in golang but there is issue called 404 page not found

2020-03-08 Thread Brian Candler
Well, I can't see your problem immediately, but you've not made it easy for anyone to help you. Am I going to retype your screen images to replicate the problem? No. Am I going to write a main() function which wraps your code, and then work out what all the import statements need to be to

[go-nuts] Re: Changing source code in order code to be supported from older Golang versions e.g. Go 1.10

2020-03-07 Thread Brian Candler
I think the problem with compiling code written for go 1.14 with the compiler for go 1.10 is not so much the minor language features like number literals, but additions to the standard library which those applications may depend on. This means you may need to backport parts of the standard

[go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-02 Thread Brian Candler
Tests that depend on the internal implementation of a function are very brittle: any refactoring and they're likely to break, which defeats much of the benefit. You can check that a function has the required visible behaviour without hooking directly into its internals, by comparing the state

[go-nuts] Re: Is the result of FindStringSubmatch correct?

2020-03-02 Thread Brian Candler
Or closer to your original code, FindAllStringSubmatch . https://play.golang.org/p/Tiva8X425k3 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: Is the result of FindStringSubmatch correct?

2020-03-02 Thread Brian Candler
Perhaps you were confused by this in the documentation : "...and the matches, if any, of its subexpressions, as defined by the 'Submatch' descriptions in the package comment" That means one value per actual parenthesised subexpression in the

[go-nuts] Re: Should it panic when set a channel to nil concurrently

2020-03-02 Thread Brian Candler
On Monday, 2 March 2020 04:49:34 UTC, Yuan Ting wrote: > > I write a simple program likes below and it triggers a data race alarm > with -race flag. But no matter how I run, this program will not panic. I > know it is legal to receive messages from nil channels, but I don't quite > understand

Re: [go-nuts] How to handle EINTR from syscall.Dup2

2020-02-29 Thread Brian Candler
On Saturday, 29 February 2020 12:37:24 UTC, Ian Lance Taylor wrote: > > On Sat, Feb 29, 2020 at 12:33 AM Brian Candler > wrote: > > > > Just to ask the an obvious question: is dup2() idempotent or not? > > dup2 in itself is idempotent. But I'm not sure that is a us

Re: [go-nuts] How to handle EINTR from syscall.Dup2

2020-02-29 Thread Brian Candler
Just to ask the an obvious question: is dup2() idempotent or not? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-27 Thread Brian Candler
The magic behind contexts is that they use a channel but without sending any data over it. Instead, *closing* the channel is a signal to terminate. This allows you to have multiple goroutines listening on the channel, and they will *all* receive the termination signal, as a broadcast. (It

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-26 Thread Brian Candler
Perhaps slightly clearer: https://play.golang.org/p/DDZxqaEFi-T -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-26 Thread Brian Candler
> > My previous questions were: How can I cancel execution of goToSleep() > function? How can I break it? > > Maybe you want something like this? https://play.golang.org/p/2dKbVMxBjaJ context is the standard way to be able to cancel one or more of goroutines,

Re: [go-nuts] Bound checks elimination hint.

2020-02-22 Thread Brian Candler
On Saturday, 22 February 2020 11:54:43 UTC, Nigel Tao wrote: > > > If the step (e.g. 3) does not divide the length evenly, then e.g. "i > += 3" can overflow such that i becomes negative, even though the > "len(a)" in the "i < len(a)" condition is a legitimate array or slice > length: a

Re: [go-nuts] Preserving extra properties using JSON unmarshal / marshal?

2020-02-22 Thread Brian Candler
Looks like your thoughts are the right ones: https://stackoverflow.com/questions/33436730/unmarshal-json-with-some-known-and-some-unknown-field-names -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-21 Thread Brian Candler
On Tuesday, 18 February 2020 18:16:57 UTC, Manlio Perillo wrote: > > Here is an example of a diff with a lot of noise, where the actual change > is very hard to see: > https://gist.github.com/perillo/c5b3bdff9e8db9c89f316670d129c0dd > > Note that using `git diff -w` is not a solution, since it

[go-nuts] Re: array json streaming inside json object

2020-02-20 Thread Brian Candler
There is even a "standard" for this: http://jsonlines.org/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this

Re: [go-nuts] Question about the zero-value design: Why pointers zero value is not the zero value of what they points to?

2020-02-19 Thread Brian Candler
I just don't like the implication that these things *haven't* been thought about, because nobody could be bothered to polish the "rough edges". -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Question about the zero-value design: Why pointers zero value is not the zero value of what they points to?

2020-02-19 Thread Brian Candler
On Wednesday, 19 February 2020 10:59:33 UTC, klos...@gmail.com wrote: > > I see in a programming language as my most important tool. I use it every > single day to make a living. It is because of that importance that I want > me (and my team) to be as efficient as possible when working with it,

Re: [go-nuts] Re: stringer command and generated String() function

2020-02-18 Thread Brian Candler
On Tuesday, 18 February 2020 09:04:49 UTC, Jan Mercl wrote: > > > A simpler and faster way again would be to use a map. > > https://play.golang.org/p/ntjhesMsSA9 > > I don't see how could be map lookup possibly faster than slice > indexing. Have you some measurements to share? > > No, I didn't

[go-nuts] Re: stringer command and generated String() function

2020-02-18 Thread Brian Candler
Or, indeed, an array of strings. https://play.golang.org/p/3Eg9va4Krqo -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.

[go-nuts] Re: stringer command and generated String() function

2020-02-18 Thread Brian Candler
Could you provide a link to where you found this code? I imagine it was done that way just for demonstrating some features of go, such as slicing and array lookups. A simpler and faster way again would be to use a map. https://play.golang.org/p/ntjhesMsSA9 -- You received this message

[go-nuts] Re: exec.Command() always returns error status of 1 when it was executed successfully

2020-02-18 Thread Brian Candler
On Tuesday, 18 February 2020 01:40:32 UTC, Dean Schulze wrote: > > I expected it to return 0 when executing successfully. What am I missing? > Given your pipeline: lspci | grep -i vga | grep -i nvidia the exit status returned is the exit status of the last command (grep -i nvidia). Then if

Re: [go-nuts] Question about the zero-value design: Why pointers zero value is not the zero value of what they points to?

2020-02-17 Thread Brian Candler
That's a very good point: * A map can contain any type of value * map[value_not_present] is defined to return the zero value * If the map contains other maps: (a) you don't want a new map to spring into life every time you access a non-existent key - especially not a floating map which isn't

Re: [go-nuts] Question about the zero-value design: Why pointers zero value is not the zero value of what they points to?

2020-02-17 Thread Brian Candler
A "usable" nil map, i.e. being able to insert into it straight away, I sympathise with. Remember though that you can't append "in place" to a nil slice: it returns a new slice object. https://play.golang.org/p/dL-r74C5m_w I presume you don't want to write the same for maps as you do for

[go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-16 Thread Brian Candler
One other thing: unless you change the entire syntax of the go language, your proposed "else" modifier needs to go on the same line as the statement it relates to. For the reason see: https://golang.org/doc/faq#semicolons -- You received this message because you are subscribed to the Google

[go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-16 Thread Brian Candler
Code like this: f, err := os.Open("filename.ext") if err != nil{ log.Fatal(err) } would become: f := os.Open("filename.ext") else err != nil { log.Fatal(err) } The `err` variable in the example above is automatically initialized to the last return value of the function call

Re: [go-nuts] Question about the zero-value design: Why pointers zero value is not the zero value of what they points to?

2020-02-14 Thread Brian Candler
In addition, consider: how would you implement the zero default when the type is self-referential? For example: type Treenode struct { left *Treenode right *Treenode } var Tree1, Tree2 *Treenode Also consider deeply nested types which include pointers to structs which contain pointers

Re: [go-nuts] Go without garbage collector

2020-02-13 Thread Brian Candler
On Wednesday, 12 February 2020 22:57:04 UTC, robert engels wrote: > > (Or even Go's GC performance progression - but as I mentioned, in this > particular test the lack of a generational collector is holding it back). > > This is discussed in great detail here: https://blog.golang.org/ismmkeynote

Re: [go-nuts] Go without garbage collector

2020-02-12 Thread Brian Candler
On Tuesday, 11 February 2020 23:55:48 UTC, deat...@gmail.com wrote: > > What about #vlang ? https://vlang.io/ > > https://vlang.io/docs#memory "(Work in progress) There's no garbage collection or reference counting. V cleans everything up during compilation. If your V program compiles, it's

Re: [go-nuts] Go without garbage collector

2020-02-12 Thread Brian Candler
On Wednesday, 12 February 2020 05:00:41 UTC, robert engels wrote: > > I found a more recent academic paper that proves my conclusions: > > > https://www.researchgate.net/publication/326369017_From_Manual_Memory_Management_to_Garbage_Collection > > It's a student paper. The bit that caught my eye

[go-nuts] Re: arm64 builder on raspberry pi 3B/3B+

2020-02-12 Thread Brian Candler
Interesting to know. When you say "an arm64 builder", I presume you already know that go can cross-compile any architecture on any machine (using GOOS/GOARCH). For testing,

Re: [go-nuts] Why Discord is switching from Go to Rust

2020-02-10 Thread Brian Candler
On Monday, 10 February 2020 10:09:47 UTC, Kevin Chadwick wrote: > > p.s. Does anyone know how well Rust reads as this is highly important to > me? > I have read Rust described as being in the spirit of "pragmatic Haskell". https://jmmv.dev/2018/07/rust-vs-go.html

[go-nuts] Re: Error checking in Go: The `try` keyword

2020-02-08 Thread Brian Candler
On Saturday, 8 February 2020 18:38:19 UTC, addi t0t08 wrote: > > > Also, without any additional changes to the language. Go already allows > separating statements with semicolons, so it would be even possible to do > the following. > > > > f, err := os.Open(file1) ; pass err > defer f.Close() >

[go-nuts] Re: Error checking in Go: The `try` keyword

2020-02-08 Thread Brian Candler
On Saturday, 8 February 2020 10:33:03 UTC, addi t0t08 wrote: > > No, 'pass' accepts an error type. in this case Foo function must return an > error type otherwise that would be a compile error. > > Ah I see: you are relying on the behaviour of errors.Wrap(nil, "dontcare"), which is valid and

[go-nuts] Re: Error checking in Go: The `try` keyword

2020-02-08 Thread Brian Candler
On Saturday, 8 February 2020 07:02:34 UTC, addi t0t08 wrote: > > I think the keyword we are looking for is `pass`. Similarly, `pass` only > needs to return if err != nil. > > func writeSomething() error { >f, err := os.Open("file.dat") >pass err >defer f.Close() > >

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-04 Thread Brian Candler
On Monday, 3 February 2020 23:10:01 UTC, Jon Conradt wrote: > > While names arguments like foo(x= 1.0, y = 23) may look like syntactic > sugar, I think you are right that they improve readability, especially of > long argument lists. The counter argument I suppose if that you could pass >

Re: [go-nuts] Question about 'import' statement

2020-02-03 Thread Brian Candler
Also, I believe "go fmt" sorts the imports. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on

[go-nuts] Re: Anomaly in RunCommand and the exit status of the child process

2020-02-03 Thread Brian Candler
I just tried this on CentOS 7.4: # *script -e -q -c "date; exit 1"; echo $?* Mon 3 Feb 19:21:17 GMT 2020 1 # *script -e -q -c "date; exit 1" https://groups.google.com/d/msgid/golang-nuts/3fea01f3-115a-4523-af6b-544bdab810f1%40googlegroups.com.

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-02 Thread Brian Candler
On Saturday, 25 January 2020 22:16:26 UTC, Eric Raymond wrote: > > > And that's the insight that led be to the extension I proposed. I asked > myself what the most natural way to pass out a soft close might be. > > Suppose we continue with the idea of an iterator being a goroutine which

Re: [go-nuts] [Proposal] Change how gofmt formats struct fields

2020-01-31 Thread Brian Candler
I use "diff -ubB foo bar" to compare files where I don't care about whitespace differences (-b within line, -B for blank lines). I believe "git diff" supports -b too. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-01-25 Thread Brian Candler
Very insightful. I am relatively new to go, but I would like to make a few observations. 1. When the issue of keyword arguments has come up before, usually someone suggests passing a struct as the function argument. Did you try this? It might be worth mentioning in your analysis, if only to

[go-nuts] Re: Can individual struct attributes be garbage collected?

2020-01-23 Thread Brian Candler
As long as t is alive, it keeps everything that it references alive. If you want the slice referenced by t.unused to be garbage-collected, then set t.unused = nil. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] Re: script with go routine is fastest the second time

2020-01-21 Thread Brian Candler
Could it be that the files from disk are "hot" in cache on the second run? Try emptying the cache before the second run. Linux: sync; echo 3 > /proc/sys/vm/drop_caches -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Information hiding within a package

2020-01-21 Thread Brian Candler
On Tuesday, 21 January 2020 11:04:28 UTC, Orson Cart wrote: > > I guess I'm looking for something like opaque pointers which were employed > to good effect in C to hide implementation details from 'peer' source > files: https://en.wikipedia.org/wiki/Opaque_pointer#C > > You can hide

[go-nuts] Re: Uncanny behaviour while syscalls

2020-01-19 Thread Brian Candler
As a first step, try printing out the error returned by syscall.Chroot() -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [go-nuts] Panicking in public API ?

2020-01-07 Thread Brian Candler
On Tuesday, 7 January 2020 07:47:28 UTC, Axel Wagner wrote: > > Personally, I consider panics "run-time type-errors". That is, they > indicate a bug that couldn't be caught statically by the type-system - so > the program shouldn't have compiled in the first place and crashing it is > the right

[go-nuts] Re: distributed runtime

2020-01-06 Thread Brian Candler
On Monday, 6 January 2020 08:36:56 UTC, ffm...@web.de wrote: > > in Amoeba a thread can be suspended, thereafter be sent to some other > machine where it is resumed. > Thread migration doesn't solve the OP's issue, because threads share memory with other threads: passing a copy of something is

[go-nuts] Re: distributed runtime

2020-01-06 Thread Brian Candler
On Monday, 6 January 2020 08:36:56 UTC, ffm...@web.de wrote: > > in Amoeba a thread can be suspended, thereafter be sent to some other > machine where it is resumed. > Thread migration doesn't solve the OP's issue, because threads share memory with other threads: passing a copy of something is

[go-nuts] Re: A question !

2020-01-05 Thread Brian Candler
Another advantage is that a single compiled binary is easy to deploy - without needing to set up a virtualenv, install dependent libraries, having to deal with different versions of python etc. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

Re: [go-nuts] Simple worker pool in golnag

2019-12-30 Thread Brian Candler
On Sunday, 29 December 2019 22:18:51 UTC, Robert Engels wrote: > > I agree. I meant that worker pools are especially useful when you can do > cpu affinity - doesn’t apply to Go. > > I think Go probably needs some idea of “capping” for cpu based workloads. > You can cap in the local N CPUs By

Re: [go-nuts] Simple worker pool in golnag

2019-12-28 Thread Brian Candler
Certainly it's important to limit the concurrency, and in your case you need to process the larger tasks first. However, to me, the defining characteristic of a "worker pool" are: 1. workers are created before any tasks need to be done 2. the same worker handles multiple tasks sequentially 3.

Re: [go-nuts] Simple worker pool in golnag

2019-12-28 Thread Brian Candler
On Friday, 27 December 2019 16:30:48 UTC, Bruno Albuquerque wrote: > > This might be useful too you, in any case: > > https://git.bug-br.org.br/bga/workerpool > > I think the point from Bryan Mills' video is, "worker pool" is something of an anti-pattern in go. goroutines are so cheap that you

[go-nuts] Re: TLS Cipher suites TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8

2019-12-16 Thread Brian Candler
There is always github.com/spacemonkeygo/openssl (even then, openssl deprecates non-recommended crypto, so you may need to build against an old version) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: TLS Cipher suites TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8

2019-12-11 Thread Brian Candler
https://golang.org/pkg/crypto/tls/#pkg-constants -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this

Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-06 Thread Brian Candler
Can you just run multiple instances of your program, each independently fetching messages from SQS? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [go-nuts] Re: Unable to lock versions when converting to go.mod

2019-11-28 Thread Brian Candler
Many thanks Axel. The problem isn't github.com/aperum/nrpe - that doesn't have any dependencies of its own outside of the standard library. However, the following three weren't vendored either: github.com/prometheus/client_golang/prometheus

[go-nuts] Re: Unable to lock versions when converting to go.mod

2019-11-28 Thread Brian Candler
I *think* I got to the bottom of this. It turns out the nrpe_exporter.go main module imports some non-vendored dependencies: - github.com/aperum/nrpe - github.com/prometheus/client_golang/prometheus - github.com/prometheus/client_golang/prometheus/promhttp -

[go-nuts] Re: Unable to lock versions when converting to go.mod

2019-11-28 Thread Brian Candler
I got a private reply saying to try "go mod why -m github.com/prometheus/common" Starting with the original go.mod, I get different answers the first and second time I run it - by which time, go.mod contents have been updated. $ go mod why -m github.com/prometheus/common go: finding

[go-nuts] Re: Unable to lock versions when converting to go.mod

2019-11-27 Thread Brian Candler
I tried blowing away my entire ~/go tree to be sure. Starting from a fresh checkout (outside the ~/go tree), and a fresh checkout and go mod init ..., here's what the build does: $ go build ./... go: downloading github.com/go-kit/kit v0.5.1-0.20170917202734-0d313fb5fb3a *go: downloading

[go-nuts] Unable to lock versions when converting to go.mod

2019-11-27 Thread Brian Candler
I am having a problem with go.mod. I'm using go 1.13.4 and you can easily replicate what I'm seeing. I am trying to convert https://github.com/RobustPerception/nrpe_exporter from vendor/vendor.json to go.mod. Here's how I start: $ git clone https://github.com/RobustPerception/nrpe_exporter $

Re: [go-nuts] Should I return an error object, or a pointer to an error object?

2019-11-13 Thread Brian Candler
Thanks. It's much clearer now. Cheers, Brian. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this

Re: [go-nuts] Should I return an error object, or a pointer to an error object?

2019-11-13 Thread Brian Candler
> the current implementation of interfaces is that they always store pointer > values. If you store a non-pointer value in an interface, that value > is copied into memory, and a pointer to that memory is stored in the > interface. I don't understand where you say "that value is copied into

[go-nuts] Should I return an error object, or a pointer to an error object?

2019-11-13 Thread Brian Candler
In https://blog.golang.org/error-handling-and-go, it shows the well-known error interface: type error interface { Error() string } and it gives an example of a user-defined error: // errorString is a trivial implementation of error. type errorString struct { s string } func (e

<    3   4   5   6   7   8