On Tue, Oct 30, 2018, at 13:48, Tharaneedharan Vilwanathan wrote:
> I am looking for a database for protobuf, preferably the one that fits Go
> environment better. I located profanedb. I am wondering if anyone tried it
> with Go and if there is any example code that I can take a look at. Also,
>
On Thu, Nov 8, 2018, at 13:49, S Ahmed wrote:
> Is there a way to ignore certain tests like my integration tests that setup
> db etc. and are long running?
I like to add a build tag to my integration tests, something like:
// +build integration
Then when I want to run them:
go test -tags
On Sat, Nov 10, 2018, at 10:39, Paul Jolly wrote:
> I don't think there's anything wrong with this distinction - when you
> say "unless this has been fixed", are you suggesting the behaviour is
> wrong or could be improved in some respect?
I've just seen several projects do this wrong because
On Sat, Nov 10, 2018, at 09:46, Paul Jolly wrote:
> > 2. "Why doesn't "go build" run "go mod tidy" automatically?
>
> It does in as much as adding missing dependencies are concerned, but
> doesn't do the tidying (removal) in go.{mod,sum} that go mod tidy
> does.
I don't think this is true
On Mon, Sep 3, 2018, at 04:10, ama...@naucera.net wrote:
> type S []int
>
> func (s *S) Last() int {
> return (*s)[len(*s) - 1]
> }
On an unrelated matter, the extra indirection is (probably) not what you want
here, slices are already a pointer type. For more information see
Hi all,
Here's a quick Git config for getting go module meta-versions from Git Log
output, hopefully its useful to someone else who was getting frustrated by
trying to make up v0.0.0 versions:
https://blog.samwhited.com/2018/09/go-module-versions-from-git-log/
—Sam
--
You received this
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.
> For more options, visit https://groups.google.com/d/optout.
--
Sam Whi
On Fri, Jan 18, 2019, at 18:06, 伊藤和也 wrote:
> When to use interfaces?
Reading this chapter in Effective Go might help. You can find answers to many
of your questions there.
https://golang.org/doc/effective_go.html#interfaces_and_types
—Sam
--
You received this message because you are
On Sat, Jan 19, 2019, at 01:12, Tyler Compton wrote:
> What alternative do you recommend?
Use what you're comfortable with. Make is a great tool, and doesn't appear to
be the problem here.
—Sam
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
On Mon, Jan 21, 2019, at 00:39, 伊藤和也 wrote:
> I checked the type of the variable "v" with interface{} using TypeOf
> function in reflect package but it returned "nil".
> var v interface{}
> fmt.Println(reflect.TypeOf(v))
>
That is what the reflect.TypeOf function is supposed to do. The docs
On Tue, Jan 22, 2019, at 03:26, Antonio Romeo Riga wrote:
> I would like to do something like that
> fmt.Printf("%-15v %5.2f %5.2f" , coin, piggyBank)
>
> %-15v and %5.2f should change the variable 'coin'.
If you want the first two verbs to both affect "coin" in your example, use
bracket
On Tue, Dec 18, 2018, at 10:13, Ian Lance Taylor wrote:
> https://tip.golang.org/cmd/go/#hdr-The_go_mod_file
Ah thanks! I wouldn't have ever thought to look there for info on the mod file.
I'll pass that along.
—Sam
--
You received this message because you are subscribed to the Google Groups
Hi all,
I've been asked multiple times recently to point people to documentation for
the language line in a go.mod file (eg. the `go 1.12' line that's added by
recent builds), but I haven't been able to find any on the wiki or in `go help
modules` or similar, just the occasional list
On Fri, Dec 21, 2018, at 14:48, Beoran wrote:
> Not go specific, there are inotifywait and entr
> http://eradman.com/entrproject/.
Or a post-push hook on the server where the repos live if you're using Git.
—Sam
--
You received this message because you are subscribed to the Google Groups
This sounds like the version is mismatched. Is the gopath version a newer
commit (with api changes) than the tag being picked in the go.mod file? I have
this quite frequently with golang.org/x/text which was last released some time
ago and have to use a replace directive to get a more up to
ap["user"].(string)
> > payload.User = user
> >
> > message := pmap["message"].(string)
> > payload.Message = message
> >
> > tme := pmap["time"].(string)
> > tmee, e := time.Parse(time.RFC3339, tme)
> > if e != nil {
On Mon, Dec 3, 2018, at 10:28, Andrew Frances wrote:
> Is it possible to get the .slide files for the
> Golang Talks https://talks.golang.org/ so I can have more examples (I don't
> really need all the accompanying files)?
https://github.com/golang/talks
--
You received this message because you
There has been some discussion of making packages in the standard library into
modules (once that's the default versioning system) which could be versioned
separately from Go so that fixes could be released without having to wait on
the full Go release cycle. I can't find a link at the moment,
On Thu, Nov 22, 2018, at 21:14, Tong Sun wrote:
> and it needs to be working under systemd.
> …
> but there is no mentioning of how it can work under systemd, which could
> be
> troublesome,
> like the question I found at why systemd cannot start golang web app
>
On Fri, Nov 23, 2018, at 17:06, Jay Ts wrote:
> Nowadays I use vim
> because there are a few nice things about it that aren't in vi. At least,
> vim is ok after you turn off syntax highlighting and all the other newbie
> crutches. :-P Seriously, how many people can't read or write in English
On Mon, Jan 7, 2019, at 07:58, minfo...@arcor.de wrote:
> I've often encountered demands for password encryption, where simple string
> hashing would suffice.
You should never encrypt passwords; encryption implies that you can get the
original password back out, it's a two way street.
Some form
On Fri, Jan 11, 2019, at 23:03, grego...@unity3d.com wrote:
> But now, I don't know how I can essentially copy the mod cache (or
> whatever the right term is) like I'd have copied the vendor directory.
If you're suggesting that you already have the module cached on the machine
that builds your
On Wed, Sep 12, 2018, at 14:12, Mirko Friedenhagen wrote:
> However, coming from Java lately, retrieving a DB-connection from a pool,
> opening a transaction and committing/aborting and returningafterwards seems
> something which could be handled with such a construct. How would you do
> this
On Fri, Sep 14, 2018, at 20:32, K Davidson wrote:
> Is there a way that I can build my package as a module without having to
> host it on the internet?
I've found myself just making up fake import statements. While you're
prototyping it doesn't hurt:
package main // import
On Sun, Jan 27, 2019, at 11:24, Kaveh Shahbazian wrote:
> Where can I find the complete reference for Go module files (go.mod)?
>
> I am particularly interested in getting fluent in using local
> packages/sub-packages and also redirecting import paths - for example
> for times I need to use a
changes [2] are merged.
—Sam
[1]: https://sourcehut.org/
[2]: https://golang.org/cl/168065
--
Sam Whited
--
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
sin xml.Decoder.Token, and UnmarshalElement when found a
> StartToken with a proper Name.Local.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving e
On Mon, Mar 18, 2019, at 06:24, Nada Saif wrote:
> I am learning to Go. For packages, do I need to use GitHub?
> I tried to build two packages one accessing functions from the other.
Welcome! You can use whatever repository hosting you want, and even use your
own domain name with it!
I encourage
On Wed, Mar 20, 2019, at 05:05, Lucio wrote:
> What I just realised is that my Makefile/mkfile-foo isn't sufficient
> to *do something* with such information, but at this point I'm willing
> to cross that bridge when I come to it. For now, having a "go status
> infernal/package", say, even if it
On Fri, Feb 15, 2019, at 20:00, Burak Serdar wrote:
> rate=1.0/double(dur)
nit: s/double/float64/
—Sam
--
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
ang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
Sam Whited
--
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
On Mon, Jan 28, 2019, at 19:44, 'Tim Hockin' via golang-nuts wrote:
> People already chide me for my affinity for baroque
> Makefiles...
I use bmake too; and here I was all this time thinking that the "b" stood for
"BSD".
—Sam
--
You received this message because you are subscribed to the
On Thu, Jan 24, 2019, at 07:00, 伊藤和也 wrote:
> Is it possible?
> package main
>
> var Number int = 100
> func main() {}
>
> package hello
>
> import "fmt"
>
> func abc() {
>fmt.Println(Number)
> }2019年1月24日木曜日 11時27分57秒 UTC+9 伊藤和也:
> > package main
> >
> > var Number int = 100
> >
> >
On Thu, Apr 11, 2019, at 15:49, erikssonfili...@gmail.com wrote:
> Using Go's standard TLS library this does not seem possible, as
> tls.Dial does not seem to do any OCSP checking. Another possible
> workaround would be to fetch the server certificate without
> performing a handshake, then check
gated everywhere yet. If you're getting TLS errors from
Netlify or can't look up the domain at all, wait 24 hours or so for
DNS to finish propagating and for the new certs to be deployed.
[1]: https://github.com/rakyll/statik
[2]: https://git.sr.ht/~samwhited/pkgzip
--
Sam Whited
-
On Thu, May 23, 2019, at 17:59, Ian Lance Taylor wrote:
> But (and here you'll just have to trust me) those executives, and
> upper management in general, have never made any attempt to affect how
> the Go language and tools and standard library are developed. Of
> course, there's no reason for
Thank you for writing your reply Ian. Since it's a rather long post I
don't want to go through it point by point, but suffice it to say that I
agree with most of what you've written. However, I also agree that Go is
Google's language, and that in its current form this is a problem. I'm going to
On Thu, May 23, 2019, at 19:22, Sam Whited wrote:
> Thank you for writing your reply Ian. Since it's a rather long post
> I don't want to go through it point by point, but suffice it to say
> that I agree with most of what you've written. However, I also
> agree that Go is Googl
On Thu, May 23, 2019, at 22:28, Anthony Martin wrote:
> How do you square this opinion with the fact that the Go team went out
> of their way to enable the use of third-party module proxies,
> something that is good for the community but would be of little
> practical use to Google?
I'm certainly
On July 12, 2019 4:35:54 AM UTC, Andrey Tcherepanov
wrote:
>What these guys are proposing in that paper would be closer to
>(Go-style)
>func f() (v value | e error) { ... }
>
>(where "|" could be read as "or" or "union")
>
I've thought a tiny bit about how union or sum types would work in Go
On Fri, Jul 12, 2019, at 06:31, Andrey Tcherepanov wrote:
> I haven't seen your proposal before, but it looks interesting - you
> seem to have put quite a thought into it already.
To be clear, this isn't actually a proposal. I was just toying with the
idea and there's really not much thought put
ey can all be found here:
https://code.soquee.net/
—Sam
--
Sam Whited
--
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...@googl
On Sun, Jul 14, 2019, at 06:53, roger peppe wrote:
> As far as I can tell, that's almost identical to the scheme that I
> suggested here:
> https://github.com/golang/go/issues/19412#issuecomment-288485048
I hadn't seen that issue, I'll have to read through it. Thanks
for the link!
—Sam
On Mon, Apr 22, 2019, at 20:18, whitehexagon via golang-nuts wrote:
> Also good to know only what I'm using gets linked in, but then the
> size of 'hello world' is even more surprising.
That's because the runtime is being linked in. Go requires, among other
things, a garbage collector and
On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> Are there really developers that find this unreadable?
>
> color := temperature > 80 ? “red” : “green”
Yes.
What is "?"? If I've never seen that before I have no easy way to search
for that, and a random symbol me nothing about what it does.
On Mon, Apr 22, 2019, at 10:14, whitehexagon via golang-nuts wrote:
> I am concerned about the Go binary size, since I'm already at 15MB! So
> I'm trying to limit external dependencies as much as possible.
Staying in the standard library won't help you here. You'll still
have to link in the code
On Mon, Aug 19, 2019, at 20:31, 'Eric Johnson' via golang-nuts wrote:
> Tips:
> * When ever you're wondering about a good library for , two good
> places to start are https://go-search.org , and
> https://github.com/avelino/awesome-go.
Also try searching on https://godoc.org/
—Sam
--
I personally wouldn't do this. If you're going to incur the overhead of a heap
allocation, might as well incur a bit more and encode the hash, eg. using
hex.EncodeToString [1], just so that you don't forget and try to print or
decode the string as utf8 later.
—Sam
[1]:
On August 20, 2019 11:50:54 AM UTC, Rob Pike wrote:
>Printf can print hexadecimal just fine. Never understood the point of
>encoding/hex.
I always thought that the C style format strings were unreadable and the hex
package methods were much clearer, personally.
—Sam
--
You received this
t; > => github.com/ugorji/go v0.0.0-20190204201341-e444a5086c43`
> On Tuesday, September 10, 2019 at 2:48:25 PM UTC+2, Darko
> Luketic wrote:
> > What used to work pre go 1.13 now doesn't work anymore
--
Sam Whited
--
You received this message because you are subscribed to th
ontributors". Google (and the core Go team that works for them) are
just one of those Contributors. Should we put every company that's ever
signed the CLA on the website too?
—Sam
--
Sam Whited
--
You received this message because you are subscribed to the Google Groups
"golang-nuts&q
On Mon, Jul 15, 2019, at 16:54, Wojciech S. Czarnecki wrote:
> Neither go-nuts list is a proper venue for the Big Enders and Little
> Enders fight. Please keep this mailing list clean.
This is the place for Go discussion. Not everyone in the community has
an account on Reddit, or even GitHub, but
On Mon, Sep 30, 2019, at 21:05, bram wrote:
> Thank you all. For schema migration i am looking for similar tool
> like flyway.
I'm not sure if it's like flyway, but I use a library that I wrote,
code.soquee.net/migration [1]. The idea is that it gives you the tools
you need to write a migration
questions as new threads with a subject that
describes what you're asking. It helps sometimes if you describe your
issue in the message body too instead of just linking to another site
(this encourages people to answer your question inline).
Thanks again, and good luck!
—Sam
--
Sam Whited
--
You
On Thu, Aug 1, 2019, at 12:09, Nitish Saboo wrote:
> How can we mock a function in Go like os.Hostname() or os.Getwd()
> ? Any framework or Library that we can use for mocking the
> function calls ?
I don't like to think about "mocking" in Go, but I can't provide an
alternative term so maybe this
On Fri, Oct 11, 2019, at 20:55, Dimas Prawira wrote:
> Stable Version : github.com/go-resty/resty/v2
>
> got 404 (not found)
That is a Go import line with a module major version suffix, not a
GitHub URL. The fact that they look the same instead of using some other
syntax is extremely annoying,
On Fri, Oct 11, 2019, at 21:24, Dimas Prawira wrote:
> Just test using got get
You appear to be using an old version of Go that doesn't support modules
or have it turned off or set to auto using the GO111MODULE environment
variable. If you upgrade to Go 1.13 and make sure GO111MODULE isn't set,
On Tue, Mar 3, 2020, at 10:09, Rizwan Iqbal wrote:
> I would avoid multiple go.mod files in one repository as well. I
> generally follow the rule of thumb, one module per repository.
I generally follow this advice too, however, I make an exception for
modules that don't need to be versioned. For
nt to use one of the formatting functions, for example:
fmt.Printf("%f Degrees to Fahrenheit is = %f\n", Degrees, fahrenheit)
For more information, see the fmt documentation: https://godoc.org/fmt
—Sam
--
Sam Whited
--
You received this message because you are subscribed
ause 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 the web
> visit
>
> htt
On Fri, Feb 14, 2020, at 09:16, kloste...@gmail.com wrote:
> *Could you please let me know the reasons why the zero value of a
> pointer is `nil` instead of a pointer to the zero value of what it
> points to?*
>
> Is it because of performance/memory? Simplicity in the runtime?
The zero value is a
your screen reader or other device?
—Sam
--
Sam Whited
--
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.c
that but we don't want that setup to
> show in the timing for the benchmark.
>
> Does anyone know of a solution to this?
Just call b.ResetTimer() after setting up your data:
https://godoc.org/testing#B.ResetTimer
—Sam
--
Sam Whited
--
You received this message because you are
etween
> methods/functions. Crazy thought !!!..
--
Sam Whited
--
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...@google
I agree. I like the filename based constraints, but having both is
annoying and since the comment based constraints are more flexible I
think they'd have to be the ones to stay. I frequently find myself
looking for constraints by grepping for whatever it is I want, but if I
have filename based
So you're suggesting that because we can't help all people all of the
time we should help no one at any time? That is a logical fallacy. Right
now in this moment there are protests all over the world about a
specific issue, so yes, a specific cause is being supported because the
time is right, and
The Go tour has a section on this that might be helpful:
https://tour.golang.org/methods/14
It matches any type, and should be avoided at all costs unless you
really know what you're doing. It sounds great, but it will probably
hurt you unless you have a deeper understanding of writing good Go
This is not a simple political issue, it is a personal human issue. It
is a social issue. It is a justice issue. It seems quite obvious to me
that this is different than if they had put a fundraiser for a candidate
for office, for instance, in a banner.
It amazes me how often people come out of
I think long years of experience has shown that this is not the case.
This argument is made frequently and amounts to "let's just ignore the
issues and hope they go away because they only affect a minority among
us". This is one of the reasons for the lack of diversity in this
industry (at least
Why is it disrespectful to the rest of the world? In what way does
supporting the Black Lives Matter movement and an important not-for-
profit diminish from other problems that also need solving?
One of my neighbors recently put it this way: would you walk up to
someone at a breast cancer
This is an important issue about the Go Community and who feels welcomed
here, which is also covered by this mailing list.
On Mon, Jun 15, 2020, at 09:18, K Davidson wrote:
> Please keep posts limited to things about go.
--
You received this message because you are subscribed to the Google
You're starting from the assumption that anything off-topic to the
language itself is bad. Why do you hold this position?
Even if we accept your position that anything slightly off topic is bad
(although I do not accept that position), this topic is relevant to
everyone trying to build a more
If the argument were what specific charity to put in the banner this
might be a discussion worth having, however I get the impression that
many of these people are arguing against including a banner at all.
On Mon, Jun 15, 2020, at 10:04, Robert Engels wrote:
> I think a more specific point to be
I should rephrase that, "it's an important discussion *for this
community*" and I think it's as important to expose this community to it
as it is any other.
On Fri, Jun 19, 2020, at 00:20, Ian Lance Taylor wrote:
> On Thu, Jun 18, 2020 at 9:04 PM Sam Whited wrote:
> >
>
See: https://github.com/golang/go/issues/4828
On Mon, Jun 8, 2020, at 05:09, lziqia...@gmail.com wrote:
> Why is there no bzip2 compression algorithm, what is the reason? Do you
> need to add it?
—Sam
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
ttps://groups.google.com/d/msgid/golang-nuts/CAPTkDQVudE24DF6tWBO6yFTyF4TgZOopEfjnqZXLhVphp8SBwQ%40mail.gmail.com
>
> <https://groups.google.com/d/msgid/golang-nuts/CAPTkDQVudE24DF6tWBO6yFTyF4TgZOopEfjnqZXLhVphp8SBwQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
--
Sam
They are directed to the Equal Justice Initiative which is a non-profit.
In the united states 501(c)3 not-for-profit organizations are barred
from certain kinds of political speech including endorsing individual
parties or candidates. The banner does not point to any particular
political party.
What makes you think this is somehow politics and not simply supporting
an important not-for-profit at a time when it's particularly relevant
and important to do so? I don't see anything political about the topic
unless you count that some of the solutions are political (but this one,
donating to
In the example you provided it is working as expected. The element
you're unmarshaling is in the "
http://www.w3.org/1999/02/22-rdf-syntax-ns#; namespace (it has an "rdf"
prefix) but the thing you're unmarshaling it into expects
"http://purl.obolibrary.org/obo/go/subsets/goslim_yeast.owl#; because
where it's defined.
Thanks for the help.
—Sam
[1]: https://pkg.go.dev/golang.org/x/net/idna#Display
[2]:https://tools.ietf.org/html/rfc5895
--
Sam Whited
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this grou
the function could keep blocking, defying user expectation
I've gone back and forth a couple of times on how I'd expect this to
behave and I couldn't find any obvious examples in the standard
library that would suggest there's a convention so I'd love to get
other opinions.
—Sam
--
Sam Whited
It's not official or Go-specific, but you could try:
https://codereview.stackexchange.com/
—Sam
On Sun, Apr 4, 2021, at 09:20, Tong Sun wrote:
> I remember I've been to a page/site where people can ask for review for
> their open source projects, commits, etc.
>
> Is there such site/service,
Yes sorry, I mean "where is it documented". The other profiles all list
the RFC from which the rules are taken, but this one does not.
—Sam
On Mon, Apr 5, 2021, at 11:58, jake...@gmail.com wrote:
> I'm guessing you want to know where the behavior is documented? That I
> do not know.
--
You
Thanks Ian,
On Sun, Apr 4, 2021, at 19:42, Ian Lance Taylor wrote:
> Speaking more broadly, while a context is often a deadline, it can
> also be cancelled for other reasons (via ctx.WithCancel). Those other
> reasons can include things like "we no longer need this data." So
> that is an
101 - 184 of 184 matches
Mail list logo