1. https://go101.org, from beginner to true gopher
2. go perf book, search it from github, this will teach you some
optimization techniques
3. here's a reading list about golang
internals:
https://hitzhangjie.notion.site/149643669e0846e6b8e3294d04a6df0d?v=e1cea88688ec4102ae5d9af8cf9ac4c7,
ac
Here're some good materials:
1. https://go101.org, after learning this, you will be a true gopher.
2. go语言设计实现,maybe there's no English version. When I learns golang, I want
to know its internals, and I kept lots of good articles,
here:
https://www.notion.so/hitzhangjie/149643669e0846e6b8e3294d0
;>>>
>>>> Just now, I use gdb to dump the ballast anon memory and use hexdump to
>>>> check its dirty content, all data is zero (Maybe zeroing happens).
>>>> But after turning GC off, it works as expected (no RSS is taken, no
>>>> DIRTY
ust be something I didn't get it.
>>
>> On Sunday, November 6, 2022 at 8:11:51 PM UTC+8 Jan Mercl wrote:
>>
>>> On Sun, Nov 6, 2022 at 12:54 PM Kn (Kn) wrote:
>>>
>>> > Now the problem begins. I expect the ballast like `ballast :=
>>>
at 8:11:51 PM UTC+8 Jan Mercl wrote:
> On Sun, Nov 6, 2022 at 12:54 PM Kn (Kn) wrote:
>
> > Now the problem begins. I expect the ballast like `ballast :=
> make([]byte, 1<<30)` shouldn't take up any physical memory because there's
> no any writing to it.
&
@
On Sunday, November 6, 2022 at 8:11:51 PM UTC+8 Jan Mercl wrote:
> On Sun, Nov 6, 2022 at 12:54 PM Kn (Kn) wrote:
>
> > Now the problem begins. I expect the ballast like `ballast :=
> make([]byte, 1<<30)` shouldn't take up any physical memory because there's
Hi, guys, I have a question about memory management.
I created a ballast in my go application, I didn't create the ballast in
the very beginning like initializing a global variable or do this in
package level init functions. I initialize it later after some setup
process.
Now the problem begin
Hi, guys. I'm learning the go fuzz testing in go 1.18 now. I find
f.Add(args...) the seed corpus is really important. If I specify a seed
corpus not so proper, the fuzz testing may spend lots of time, which is not
meaningful.
Are there ways to help the fuzz engine quickly find the better input
Hello everyone, first time here so please bear with me.
I got the tipp of asking this rather fringe case question here from
comments on my /r/golang post.
In brief I want to create a shared library out of a golang project so that
it can be dynamically loaded by applications written in another
nt is short, I use the one-line version,
> otherwise (or if I need to use either result after the conditional) I use
> the version with a separate statement. But that's a rule-of-thumb, as I
> said, I decide case by case.
>
> On Fri, Nov 12, 2021 at 5:05 AM Kn wrote:
>
&g
ents.
If each error assignment statement only return single return value (the
error itself), I code it in one-liner way.
On Friday, November 12, 2021 at 4:53:21 PM UTC+8 Kn wrote:
>
> Oh, I have a typo error, in the second pattern, `err := doAnotherthing()`
> should be `err = doAnotherth
Oh, I have a typo error, in the second pattern, `err := doAnotherthing()`
should be `err = doAnotherthing()`.
On Friday, November 12, 2021 at 4:02:34 PM UTC+8 Brian Candler wrote:
> func MyFunc() error {
> v, err := doSomething()
> ...
> err := doAnotherthing()
> }
>
> That won't compile a
Hi, guys, I want to know which error handling pattern do you prefer.
Following is a code snippet from go stdlib.
https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/h2_bundle.go?L1848
Let me simplify my questions:
Pattern1: like the code in go stdlib, in the same function, we first
I found this issue: https://github.com/golang/go/issues/41205.
I found the answer, this conversation could be closed.
On Thursday, May 20, 2021 at 3:39:28 PM UTC+8 Kn wrote:
> So sorry I didn't get how to format the code in the edit window.
>
> On Thursday, May 20, 2021 at 3:37:
So sorry I didn't get how to format the code in the edit window.
On Thursday, May 20, 2021 at 3:37:35 PM UTC+8 Kn wrote:
> Hi, guys, I need to acess shared memory, so I write some code like this:
>
> ```go
> func shmget(key int, size int, mode int) (int, error)
Hi, guys, I need to acess shared memory, so I write some code like this:
```go
func shmget(key int, size int, mode int) (int, error) {
shmId, _, ret := syscall.Syscall(syscall.SYS_SHMGET, uintptr(key),
uintptr(size), uintptr(mode))
if ret != 0 {
return 0, fmt.Errorf("shmget ret: %d", ret)
}
retur
Add option `-coverpkg=$(go list ./...|sed 's/ /,/g')` works.
On Tuesday, May 24, 2016 at 9:31:52 PM UTC+8 Dave MacFarlane wrote:
> If all you're trying to do is get coverage of all your subpackages for a
> CI and aren't concerned about downstream packages or manually toggling
> which ones are
Ian, I understand now. Thanks you! :)
On Friday, November 27, 2020 at 5:10:18 AM UTC+8 Ian Lance Taylor wrote:
> On Thu, Nov 26, 2020 at 11:50 AM Kn wrote:
> >
> > Hi, I am writing a golang debugger and some documents to show others the
> knowledge about how to develop
Hi, I am writing a golang debugger and some documents to show others the
knowledge about how to develop a golang debugger.
I notice go debug/elf, debug/gosym is enough for the occasions like lookup
symbol, pcToLn, lnToPC, maybe even for backtrace?
I want to know why go generate .gosymtab (now i
19 matches
Mail list logo