With the recent Gophercon being held I wonder if any videos have been
posted of the talks? I'm especially interested in the move to Go 2 and the
plans for generics.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from
Vendor must be kept for when dependencies are no longer available online.
On Saturday, 17 November 2018 04:33:55 UTC, Henry wrote:
>
> Hi,
>
> It seems to me that go modules and vendor attempt to solve the same
> problem. I wonder whether we should just choose one and scrap the other, or
>
If the file is consistent parse the Json part out of each line and just
unmarshal it.
On Thursday, 1 November 2018 16:14:17 UTC, Alex Dvoretskiy wrote:
>
> Is there is a way to read a file line by line and extract JSON data from
> it?
>
>
> Example:
>
> file:
> `
> value1: {"field1": "123,
Maybe it's worth adding to:
https://github.com/golang/go/wiki/Go2GenericsFeedback
On Tuesday, 23 October 2018 17:37:40 UTC+1, Burak Serdar wrote:
>
> I typed this up in a more organized way, and it turned out to be an
> alternative declaration for contracts without touching the generics
>
In that example, how would you call the `New` function?
On Monday, 22 October 2018 10:10:51 UTC+1, Sebastien Binet wrote:
>
> Hi Volker,
>
> On Mon, Oct 22, 2018 at 10:57 AM Volker Dobler > wrote:
>
>> The Go 2 draft generics draft has been discussed a lot,
>> especially contracts have drawn a
I'm having trouble installing golint. Any idea what the problem could be?
$ go get -u -v github.com/golang/lint/golint
github.com/golang/lint (download)
package github.com/golang/lint/golint: code in directory /home/gary/Code/go/
src/github.com/golang/lint/golint expects import
Add it to this: https://github.com/golang/go/wiki/Go2GenericsFeedback
On Wednesday, 10 October 2018 22:14:35 UTC+1, Ian Denhardt wrote:
>
> I've seen a lot of folks expressing the sentiment "we should just use
> interfaces instead of this new contract thing." Most of the discussion
> I've seen
You can also use the handy command `go mod download -json` to view
information about the dependencies and where they are on disk for a module.
On Monday, 8 October 2018 22:29:46 UTC+1, ppras...@splunk.com wrote:
>
> Got it, Thanks Wagner.
> I did not set GOPATH since I was using GO111MODULE=on.
I think it's worth raising an issue for this. Vendoring should copy the
whole repo.
On Monday, 24 September 2018 07:43:24 UTC+1, Justin Israel wrote:
>
>
>
> On Tuesday, September 18, 2018 at 8:58:01 AM UTC+12, Frits van Bommel
> wrote:
>>
>> According to the help text that's the intended
Your program doesn't work.
On Saturday, 11 August 2018 09:10:04 UTC+1, 子風 wrote:
>
> Hi
>
> https://play.golang.org/p/AIB-yJaExVu
>
> When I want to use examples to test my code, I find something odd.
> Example1 could pass, but Example2 failed
>
> --- FAIL: Example2 (0.00s)
>> got:
>> hello
>> .
See this blog post for more interesting ways to handle goroutine
communication and synchronization:
http://nomad.uk.net/articles/interesting-ways-of-using-go-channels.html
On Wednesday, 8 August 2018 04:59:48 UTC+1, natea...@gmail.com wrote:
>
> https://play.golang.org/p/d5n9bYmya3r
>
> I'm new
Just re-organise the code a bit, try
this: https://play.golang.org/p/GMpfZlCNP9G
On Wednesday, 8 August 2018 04:59:48 UTC+1, natea...@gmail.com wrote:
>
> https://play.golang.org/p/d5n9bYmya3r
>
> I'm new to the go language and trying to figure out how to sigint a
> blocking goroutine. in the
Maybe file an issue here?:
https://github.com/golang/go/issues
On Friday, 18 May 2018 13:55:00 UTC+1, Sergey Mosalov wrote:
>
> Hi!
> In version 1.9, I had no problem getting the FormValue in http request.
> After upgrading to version Go 1.10 of FormValue is empty. Did I find the
> error? in
OMG I didn't realize that repo had gone. I need to update some of my
projects. Christ sake!!!
On Tuesday, 24 April 2018 16:42:33 UTC+1, thec...@netflix.com wrote:
>
> Hey Gary,
>
> This isn't a leftpad moment. Your code can still be compiled, and there's
> a not too invasive workaround:
>
> -
This is Go's leftPad moment. Dependency management is a complete joke in Go!
https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
On Monday, 23 April 2018 14:58:55 UTC+1, takanao ENDOH wrote:
>
> Hi, guys.
>
> Could not `go get golang.org/x/lint/golint`
>
Thanks for the all the responses but I was after a more dynamic solution
where you don't need to 'register' the types or select them using a switch
but that it just works.
For example, to support new types (like the PHP code) I was hoping you
could just add the structs and no more changes to
Thanks. I read that blog post earlier and presents two different ways of
handling this. Each maintains a list of switch cases and constants
respectively so still not entirely dynamic.
I'll probably just go with a switch then.
On Wednesday, 28 March 2018 13:25:47 UTC+1, Andrei Tudor Călin
Is it possible to unmarshall Json by selecting the struct from a field in
the Json?
I'm porting some PHP code to Go and this is something I may have to
approach differently.
Here is the Json:
[
{
"class": "Domain\\Model\\Message",
"skus": [
"FOO1"
],
A `return` should kill it.
On Thursday, 11 January 2018 15:50:24 UTC, Iman Tumorang wrote:
>
> I'm using goroutine with 2 concurrent jobs.
>
> And I've using context with both of the goroutine.
>
> I use
> context.WithTimeout
>
>
> func (u *feedUsecase) fetchDataWithContext(ctx
I think it's a nightmare to set Eclipse up to support Go. Here's a 20
minute tutorial:
https://www.youtube.com/watch?v=v6Wn5gUSEwM
If you fancy swapping editor, try Visual Studio Code. It's Go support is
second to none (just install the Go plugin and you're done) and has
excellent debugging
There are syntax errors in your code.
On Tuesday, 17 October 2017 09:13:41 UTC+1, Christian LeMoussel wrote:
>
> I need to calculate 10 millions of sha256 checksums,
>
> Actually I do this :
>
> var bl int
> var pnb = make([]byte, 10)
> var hash = [32]byte
> var sha256Hash string
> var steps =
You could try plugins:
https://golang.org/pkg/plugin/
On Friday, 29 September 2017 05:21:54 UTC+1, Abhijit Desai wrote:
>
> Want to create libraries ( static or dynamic ) so that that I don't want
> to compile every time when I build my executable
>
> "github.com/everjit/Ion" <--- should not
Using D syntax:
func (r MyType) foo(A, B)(x A, y B) (z B, err error) {
...
}
result, _ := MyType.foo!(int, int)(10, 20)
Also, there's no reason why A and B can't be inferred:
result, _ := MyType.foo(10, 20)
It looks alright to me and very useful!
On Thursday, 24
Right, now show me the contents of the *average wage by country *function!
It's not going to be one line or as readable is it?!?!
On Friday, 2 June 2017 14:26:47 UTC+1, Egon wrote:
>
> On Friday, 2 June 2017 15:59:41 UTC+3, gary.wi...@victoriaplumb.com wrote:
>>
>> Generics enable more than just
I'm just guessing but I don't think the emulated version is faster, just
that it is not being throttled. Usually, when creating games or demos there
is a throttle in the code to stop the main loop from executing as fast as
it can. It looks like this is being respected on Mac but not in the
See: https://golang.org/pkg/unicode/utf8/#DecodeRuneInString
On Saturday, 22 April 2017 19:51:09 UTC+1, Tong Sun wrote:
>
> Hi,
>
> Given a unicode code string, be it "4e16", or "0x4e16", or "u4e16", how to
> turn it into a single char rune?
>
> You can finish the code at
Parametric polymorphism is enabled by generics.
On Friday, 24 March 2017 19:16:24 UTC, Rob 'Commander' Pike wrote:
>
> Algorithms are not helped by generic types as much as by polymorphism, a
> related but distinct subject.
>
> -rob
>
>
--
You received this message because you are subscribed
Go strings are UTF-8 encoded as others have mentioned. This means that each
human readable character in the string is really a cluster of one or more
runes. Some characters are made up of one rune, some are made up of many.
Some runes combine with others to create different characters. Also,
Thanks!
On Sunday, 5 February 2017 01:25:21 UTC, Nigel Tao wrote:
>
> On Mon, Jan 23, 2017 at 6:03 AM, kalekold via golang-nuts
> wrote:
> > Hmm.. the source gif I'm using must be compressed. Doesn't Go handle
> > compressed gifs in the same way? When you say 'I
It should always be 'use the best tool for the job'. If Go seems like a
good fit for a task, use it. We've used Go for creating web services
accessed via restful API's and it works great. I've personally used Go to
create command line utilities to help with development. We've also used it
to
https://godoc.org/?q=terminal+color
On Friday, 1 February 2013 23:02:04 UTC, Constantine Vassilev wrote:
>
> I am printing a lot lines in command line during testing.
> Visualizing using a color would be great.
>
> Are there a way to send color related commands to the terminal using*
> printf*?
Yeah, the Json decoder should handle it. Maybe post a bug report?
https://github.com/golang/go/issues
On Friday, 23 September 2016 15:21:13 UTC+1, Mark Richman wrote:
>
> This works great, thanks! https://github.com/spkg/bom
>
> Agreed, JSON should not have BOM, however there is still software
This looks like a compounded error.
First, Json should never have a BOM encoded within it. Second, it seems
like the Go Json decoder doesn't account for the BOM if it is mistakenly
encoded. Both are mentioned in the Json RFC:
https://tools.ietf.org/html/rfc7159#section-8.1
On Friday, 23
You might be interested in this:
Golang UK Conference 2016 - Nicholas Ng - Static Deadlock Detection for Go:
https://www.youtube.com/watch?v=NOQdkbp-950
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
Purely out of interest, why not upgrade to v1.7.1?
--
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.
For more options,
Hi,
I'm giving a talk at work introducing Go and I'm looking for small examples
to show Go's potential. For example, the following program demonstrates a
bare-bones webserver in 13 lines:
import (
"fmt"
"net/http"
)
func home(w http.ResponseWriter, r *http.Request) {
36 matches
Mail list logo