>
> Having an option to link to old docs on golang.org (say
>
golang.org/pkg/something?tag=1.6.0) will result in people linking to
> that option, crawlers storing that option, search engines pointing to
> that option, and articles, help information and whatever else online
> pinning
Why embedded type aliases get ignored through JSON marshaling?
For example, having:
type Num = int
type Count = int
type Max = int
type Test int
type data struct {
Num
Count
Max
Test
}
The only embedded part that gets marshaled to JSON properly, is Test.
--
You received this message
Thanks for the reply.
Hopefully the doc can be changed to avoid confusion.
On Sunday, January 21, 2018 at 1:16:04 PM UTC+8, Ian Lance Taylor wrote:
>
> On Sat, Jan 20, 2018 at 8:43 PM, Glen Huang > wrote:
> >
> > The doc for the method type in the reflect package
> >
On Sat, Jan 20, 2018 at 8:43 PM, Glen Huang wrote:
>
> The doc for the method type in the reflect package
> (https://golang.org/pkg/reflect/#Method) seems to suggest that it's possible
> to inspect a type's unexported methods:
>
> // PkgPath is the package path that
On Sat, Jan 20, 2018 at 3:56 PM, Peng Yu wrote:
>
> The following example shows that go files cannot be nested in a
> package. Is it so that the go files in a package must be at the root
> level of the package?
Yes, the go tool expects that all files in a single package will
You can implement your own http.Transport.DialContext.
// from https://github.com/codesenberg/bombardier
type Conn struct {
net.Conn
read, written *int64
}
func (c *Conn) Read(b []byte) (int, error) {
n, err := c.Conn.Read(b)
if err == nil {
atomic.AddInt64(c.read,
Hi all,
I'm looking for feedback on a build tool I created to fill some gaps I saw
in the Golang project build space. While I've used this tool for 9 months
or so, you can very much consider it a prototype of sorts, or a concept,
and PRs are definitely welcome. This is hopefully the beginning
Hi,
The doc for the method type in the reflect package
(https://golang.org/pkg/reflect/#Method) seems to suggest that it's
possible to inspect a type's unexported methods:
// PkgPath is the package path that qualifies a lower case
(unexported)
// method name. It is empty for
Hi,
The following example shows that go files cannot be nested in a
package. Is it so that the go files in a package must be at the root
level of the package?
==> main.go <==
// vim: set noexpandtab tabstop=2:
package main
import (
"fmt"
"./mypackage"
)
func main() {
No, the imported package consists of all files in the directory denoted by
the import path.
On Sat, Jan 20, 2018, 23:48 Peng Yu wrote:
> OK. In this example, if there are multiple the files in mypackage
> directory. All of them will be loaded. Is there a way to only import
OK. In this example, if there are multiple the files in mypackage
directory. All of them will be loaded. Is there a way to only import a
single go file when there are multiple go files in a package
directory?
On Sat, Jan 20, 2018 at 4:32 PM, Jan Mercl <0xj...@gmail.com> wrote:
> Look for the term
Look for the term "exported" in the language specification.
On Sat, Jan 20, 2018, 23:30 Peng Yu wrote:
> Why is only Add allowed? Where is this documented?
>
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Why is only Add allowed? Where is this documented? Thanks.
On Sat, Jan 20, 2018 at 2:49 PM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Sat, Jan 20, 2018 at 9:29 PM Peng Yu wrote:
>
> s/add/Add/g
>
>
> --
>
> -j
--
Regards,
Peng
--
You received this message because you
On Sat, Jan 20, 2018 at 9:29 PM Peng Yu wrote:
s/add/Add/g
--
-j
--
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
Hi,
I would like to import go files local. But I got the following error
when I try use `add()`. Does anybody know how to fix the error?
Thanks.
$ cat.sh mypackage/myfile.go main.go
==> mypackage/myfile.go <==
package mypackage
import "fmt"
type Export struct {
}
func (c Export) DoMagic() {
Hi, the concept of peekable iterator from python is very convenient.
Is there something similar in golang.
https://github.com/erikrose/more-itertools/blob/master/more_itertools/more.py#L134
--
Regards,
Peng
--
You received this message because you are subscribed to the Google Groups
In docs for boltdb it is stated that NoSync should be used very carefully
because it can leave the database in an inconsistent state.
If a full fledged distributed database was the case, a no-sync manner would
be acceptable. But for an embedded database, it is not a plus (to be
performant in
Are you using 'SyncWrites=false'? (Or 'NoSync' with boltdb?)
It looks like the badger benchmarks from github.com/dgraph-io/badger-bench
do not sync.
On Thursday, January 18, 2018 at 1:33:02 PM UTC-6, dc0d wrote:
>
> Badger write performance is a bit worse than boltdb. And badger suggests
>
18 matches
Mail list logo