> [..] when the method modifies the sruct's members (or just have a
sync.Mutex member)
>From my experience, these are the major points for defaulting to use the
pointer receiver "when in doubt". The difference between "func (t T) Foo"
and "func (t *T) Foo", is often too subtle to spot a bug in
Hey there,
Which OS (Linux distro) you're using? As far as I can see from cgo_linix.go
[1], the constants, that trigger an error, should come from the "netdb.h",
which comes with libc.
[1]: https://github.com/golang/go/blob/go1.19.13/src/net/cgo_linux.go
On Thursday, November 2, 2023 at
A thing, that it may be valuable to explain further, is that Go's
"database/sql" doesn't come with a built-in query builder.
The package implements the database connection pooling/management, but it
passes the user's SQL input and its arguments to the "driver". Depending on
the particular
Hey there,
In this issue, back then (https://github.com/google/pprof/issues/359), I
linked my interpretation for the reasoning to switch from flame graph to
"icicle graph". Just as you wrote, in some (many) cases, the investigations
starts from the bottom of the graph, forcing a user to scroll
Hey Michael,
> The piece I'm missing is how to construct a proxying handler that will
use the identifier in the link to look up the tunnel port and fetch the
IOT's home page and thereafter make it seem as though the user is directly
browsing the IOT.
If I got the question right, there are two
Hey Mariappan,
>From my experience, there are several possible options:
I believe you can use GOTRACEBACK=crash env variable (or its equivalent in
the runtime/debug package in the std) to get a coredump on the crash. See
this old post from JBD [1], that explored this.
If you clearly observe,
> If the connection to the server is lost while transmission, you will
probably receive a broken pipe error.
> If the timeout happens before sending data, nothing to care.
> If the timeout happens during data transmission, well, you may have
incomplete data(corrupted) in the server.
In addition
One particular example is if you use std's net/http server, you
(indirectly) use recover. The std's documentation for the Handler interface
has a section, where they outline how the server recovers from a panic,
that fired in the context of a request https://pkg.go.dev/net/http#Handler
On
Hey there,
> I took runtime/cpuprof.go with version 1.4, where cpuprof.go just
appeared with the same result. :-)
I think this is expected.
Go 1.4 was released in 2014 — several years after the original post about
pprof, had been published. In fact, Go 1.4 is the version where the
relevant
Hello,
I suspect this is due to how the current version of Go runtime's CPU
profiler keeps only up to 64 items, when it builds the function's stack
frame (refer to
https://github.com/golang/go/blob/go1.17/src/runtime/cpuprof.go#L21) With
that, the resulting profile misses the relationship
For the current system, that concists of <100 µ-services (the whole system
is owned by one team), I'm trying to evaluate C4 model https://c4model.com.
TBF, this is an ongoing experiment for myself, and I don't try to strictly
follow the C4's nomenclature, but I find the idea of zooming-in &
I don't think the current API provides that functionality.
In the original proposal for signal.NotifyContext, there were several
discussions, including related to what features the new API should provide.
The consensus was that if a user wants to make a decision base on the
signal caught, they
I think I didn't get what you're building right. Now, it looks like,
instead of implementing a custom RR's director, you need to configure its
Transport [1], which will be aware of your auth proxy in the middle. Have a
look at net/http.Transport.Proxy field [2] for that.
[1]:
Hey there,
Seems the issue hides in the chunk, where you overwrite reverse proxy's
"Director" method, which NewSingleHostReverseProxy creates internally.
Since your own director doesn't set the client request's Schema and Host,
you have to either do that manually or make sure you call the
golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXNV6bLQQUFmVn14xnxheALTKbv1_oQODovboLEziPKSw%40mail.gmail.com
> .
>
--
Vladimir Varankin
vladi...@varank.in
--
You received this message because you are subscribed to the Google Groups
Hey,
I don't think the statement about "assert going against the best practices
in go unit tests" stands against the reality, sorry. One definitely doesn't
have to use a separate assertion package to write unit-tests in Go,
comparing to some other programming languages. But there is really no
Hey!
Several months ago I opened the proposal for extending the systax of go.mod
in order to allow to specify/overwrite the source URL for a dependency
(https://github.com/golang/go/issues/39536). It feels it could also solve
what you described in "Problem 1", although the motivation behind
Hey!
My peaks, that helped me a lot, back when I started with Go (depending on
what's your prefered way to learn and how fast do you have to learn it,
some might be less useful than the others. But it's worth to have the
options):
- Books
Go in Action — an extreamly good introduction to the
Hey,
I haven't looked deep but I recall there had been a note about runtime
change in Go 1.13's https://golang.org/doc/go1.13#runtime That is
> The runtime is now more aggressive at returning memory to the operating
system to make it available to co-tenant applications [..] However, on many
Hey,
In your example, "~/Documents/tool/tejia_analysis" is your module's source
root, right? Could you show where "app_server/util/analysis.go" is on the
FS and what is the name of the module?
pprof has a coupe flags to manipulate with the path, helping it to search
for the source code. I
Note, Ubuntu Server 19.10 (arm64) works out of the box on Raspberry Pi 3
and 4, It might be an easier option.
I've written about my experience of running 19.10 on Pi 4 [1]. But I didn't
manage to run 18.04 — headless mode just didn't work and I didn't have
opportunity to attach a keyboard and
I faced the same problem lately. Have open an issue
https://github.com/golang/go/issues/37158
On Thursday, February 6, 2020 at 8:53:03 AM UTC+1, Jérôme LAFORGE wrote:
>
>
> I haven't verified this, so this is just a guess, but perhaps without
>> -trimpath the go tool is using the prebuilt
Hi Michel,
Have tried collecting your program's heap profiles [1] (maybe once after
each reload cycle)? Comparing pprof results should show you what objects
leak memory.
[1]: https://blog.golang.org/profiling-go-programs
On Tuesday, April 30, 2019 at 3:36:34 PM UTC+2, Michel Levieux wrote:
>
I believe, "runtime.chanrecv1" is the receiving part of a channel. From
what you've described, it sounds like you have a dead-lock somewhere.
In your "out.svg" diagram check what functions are dominating around
channel read and check if dead-lock is there.
On Thursday, November 15, 2018 at
Hey there!
I don't know much about jfrog, but was curious to delve into the enterprise
proxies topic. It seems that you're supposed to use jfrog's own
jfrog-cli [1] to work with the artifactory. I believe the CLI simply set a
proper value to GOPROXY to URL, that supports gomod proxy protocol
I've seen a similar issue on one of your test hosts and it turned out the
issue was due to a non-responding NS server in the host's resolv.conf.
See https://github.com/golang/go/issues/27525 DNS regression.
On Wednesday, September 5, 2018 at 5:07:01 PM UTC+2, mrauh wrote:
>
> Thanks for your
I think it's way harder to guaranty that the globals aren't used since even
non-exported functions/varibles can be used by the linker.
On Saturday, April 21, 2018 at 3:30:22 PM UTC+2, 子風 wrote:
>
> What did you do?
> https://play.golang.org/p/aryK9Btv5kH
>
> What did you expect to see?
> The CPU profiler told me that the program is spending a lot of time doing
GC (obviously), and memory profiler is telling me there is a huge amount of
memory allocated for json encoding/decoding, which is inevitable for
business logic.
Even though Go is GC based language, Go prefers object
Thank you, Dave, for the response.
> You’ll have a more enjoyable go experience if you structure your code
into packages and use go build or preferably go install.
To be fair, I don't think that having the ability to do build + run in one
go command goes against the fact that it's worth to
Currently `go run` accepts a file or a list of ".go" files:
```
% go help run
usage: go run [build flags] [-exec xprog] gofiles... [arguments...]
```
For me, it doesn't seem to be obvious, why can't "go run" accept the
directory that contains files of the main package as an input?
Note, I'm
Hi Brunetto,
While I don't have "a take and go" solution, I have some thoughts to
discuss.
What I like about swagger and openapi is the ability to abstract the way
you describe your API's, from the particular implementation. This paradigm
is (almost) perfectly matches to Go's code generation
Do you consider applications from continents other than the US?
On Wednesday, September 13, 2017 at 7:45:11 PM UTC+3, gabr...@vimeo.com
wrote:
>
> We have lots of jobs programming in Go at Vimeo's headquarters in NYC!
> Please reach out to me at gabr...@vimeo.com if you or
> anyone you know
"-pkgdir" flag of "go build" / "go install" could also be useful, although
I haven't tried it.
On Monday, June 12, 2017 at 1:06:49 PM UTC+3, Vladimir Varankin wrote:
>
> I think the difference is that I use my project root as my GOPATH, so pkg
> director
I think the difference is that I use my project root as my GOPATH, so pkg
directory ($GOPATH/pkg), which stores the build cache, is mounted inside the
container every time I run the build. What if you try
```
docker container run --rm -v $PWD:/usr/src/prj -v $PWD/_build:/usr/pkg ...
```
Doing
Hey James,
Could you show the docker run command, which you invoke to enter a container?
I use docker to build my application as well, so I just do `docker container
run --rm -ti --volume $PWD:/gocode/src/app --workdir /gocode/src/app
go build`. Doing so with container reusage or not, I
35 matches
Mail list logo