Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Tom Mitchell
On Wed, Dec 12, 2018 at 10:15 PM snmed wrote: > Thank you very much for your reply. It seems to be a possible way to do > it, what do you think about the athens way? In my point of view it would be > the easiest way as far i can preload the athens cache with all the required > packages, > And the

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread snmed
Thank you very much for your reply. It seems to be a possible way to do it, what do you think about the athens way? In my point of view it would be the easiest way as far i can preload the athens cache with all the required packages, And then the only thing a developer has to do, is to set the G

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Justin Israel
On Thu, Dec 13, 2018 at 11:19 AM snmed wrote: > Hi thepudds > > Thanks for you Reply. Indeed vendoring is an Option, but I'm not sure how > long that will be supported. I think i've read about a blog post which says > vendoring will be remove from the go tools, but i'm not sure if this still > on

Re: [go-nuts] Pause failures, GC, & StopTheWorld

2018-12-12 Thread Eric Hamilton
We do have a convenient sampler that tells us the state of all of the goroutines, goprocs, and threads: schedtrace+scheddetail. The traces in my first post were one example, but I think I can find/repro a simpler case where we are stuck harder with nothing changing until the SIGTERM comes in.

[go-nuts] Re: [security] Go 1.11.3 and Go 1.10.6 pre-announcement

2018-12-12 Thread Dmitri Shuralyov
Hello gophers, The release is still in progress. For today, we are now outside the time window in which we are comfortable completing it. No details of the security issue have been made public yet, so we are rescheduling the release for tomorrow, Thursday, December 13 at approximately 8 pm UTC (1

Re: [go-nuts] Pause failures, GC, & StopTheWorld

2018-12-12 Thread robert engels
I think the allocation triggers the GC, but it is stuck in start because it is waiting for all other Go routines to come to the safe point. I would grab a trace (but I’m not sure you can capture the trace if things are “stuck”) and review that. Or maybe use an external sampler like ‘Instruments’

Re: [go-nuts] Pause failures, GC, & StopTheWorld

2018-12-12 Thread Eric Hamilton
Thanks for the various possibilities. It’s helpful to know things to look out for. I don’t think there’s a tight polling loop in the code— at least I haven’t found it yet. We’re using some open source packages, notably Kanister (https://github.com/kanisterio) which Kasten contributes, Stow (

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Wojciech S. Czarnecki
On Wed, 12 Dec 2018 13:35:36 -0800 (PST) thepudds1...@gmail.com wrote: > Hi Sandro, > > Vendoring is another approach that can work here. IMO a big No! Vendoring is a footgun (talking secure corporate environment settings). There are too many ways to get Bob and Anna developers and builder box t

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread robert engels
The modules Wiki https://github.com/golang/go/wiki/Modules is 68 pages long… not sure how such a simple need, solved many times before, ends up needing 68 pages to describe its usage. (I realize that a lot of the text is the FAQ, but still, if you need

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Wojciech S. Czarnecki
On Wed, 12 Dec 2018 11:59:59 -0800 (PST) snmed wrote: > Hi all > > Our customer demands an offline development environment with no internet > connection, is there any best practices to handle package download and > project setup for such an use case? Such setups are supported by the Go from i

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Ian Lance Taylor
On Wed, Dec 12, 2018 at 8:08 AM Robert Engels wrote: > > I am pretty sure that the correct solution is to decouple the package from > its location. And a global Go registry can tell Go get where that package can > currently be found. You don't need a global registry. Or, rather, the global reg

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread robert engels
It was called “sneaker-net” in my day… what a PITA > On Dec 12, 2018, at 4:24 PM, Sotirios Mantziaris > wrote: > > would this one the problem of forking or transfer to another account? The go > module path would still be the old one. > Like mentioned before it would be nice if the hosting path

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread snmed
Hi Tom Thanks for your input. Generally speaking, the overall process how to handle development in an air gapped environment is clear and also how i can identify the required files. My question was more about best practices to handle such situation for go project. At the moment i favour athens

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Sotirios Mantziaris
would this one the problem of forking or transfer to another account? The go module path would still be the old one. Like mentioned before it would be nice if the hosting path and the module path could be different e.g. hosting path github.com/mantzas/test module path "test". On Thu, Dec 13, 2018

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread snmed
Hi thepudds Thanks for you Reply. Indeed vendoring is an Option, but I'm not sure how long that will be supported. I think i've read about a blog post which says vendoring will be remove from the go tools, but i'm not sure if this still on the Roadmap of the go Team. I will have a look into the

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Tamás Gulácsi
With go modules you can import whatever/btcutil and force to be ../btcutil (see the replace directive). -- 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-nu

Re: [go-nuts] Re: Generics

2018-12-12 Thread Tharaneedharan Vilwanathan
BTW, I understand generics is not top priority and will show up in Go sometime later. But I happened to notice data structure code with generics. I liked the idea of writing code once for all data types. For example: https://github.com/raywenderlich/swift-algorithm-club https://github.com/raywende

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Dave MacFarlane
Relative import paths was a feature in old versions of Go and explicitly removed *because* of Go modules: https://github.com/golang/go/issues/26645 https://github.com/golang/go/issues/27224 On Wed, Dec 12, 2018 at 1:52 PM Sotirios Mantziaris wrote: > > I was under the impression that go modules

[go-nuts] Go “service container” thoughts

2018-12-12 Thread Zellyn
Hi folks, At Square, we have a collection of shared frameworks and library code, loosely referred to as the “service container” in each language. For example, our framework code in Go includes: - a lightweight "module" system for dependency injection - config: a way of layering yaml files

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread thepudds1460
Hi Sandro, Vendoring is another approach that can work here. In a pre-modules world, vendoring is fairly well known. In a modules world, vendoring is still an option. For example, you can see this FAQ here that touches on using 'go mod vendor' with modules: https://github.com/golang/go/w

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Tom Mitchell
On Wed, Dec 12, 2018 at 12:00 PM snmed wrote: > Hi all > > Our customer demands an offline development environment with no internet > connection, is there any best practices to handle package download and > project setup for such an use case? And how would the new go modules fit in > in such an e

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread snmed
Thank you for you reply, yes i have already read about that project, but as far as I see, there is no offline loading implemented. But I'm sure it would be doable with some customisation. I wondering if there is another approach for an offline scenario. Some other ideas or suggestions? Thanks

Re: [go-nuts] Re: [ANN] Geometric index Library

2018-12-12 Thread Gabriel Furstenheim Milerud
Thanks Davis, I think it's a good idea. I started with an interface (for the whole array) but it was too cumbersome. As for the build tags, do you know of a good reference, specially for this use case. @Roberts, it's hard to give exact numbers, specially for the heap since it's been a long proces

[go-nuts] Re: Json and value

2018-12-12 Thread olivier . galeote
i use this and work fine url :="http://192.168.0.28:8000/api/filter/192.168.0.31/"; resp, err := http.Get(url) defer resp.Body.Close() if

Re: [go-nuts] Go offline development recommendations

2018-12-12 Thread Burak Serdar
On Wed, Dec 12, 2018 at 1:00 PM snmed wrote: > > Hi all > > Our customer demands an offline development environment with no internet > connection, is there any best practices to handle package download and > project setup for such an use case? And how would the new go modules fit in > in such a

[go-nuts] Go offline development recommendations

2018-12-12 Thread snmed
Hi all Our customer demands an offline development environment with no internet connection, is there any best practices to handle package download and project setup for such an use case? And how would the new go modules fit in in such an environment? Any advise will be most appreciated. Cheer

Re: [go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Robert Engels
I’ll admit I thought that modules would solve this problem as well, which is why I stopped worrying about it, but in the module examples I’ve reviewed I don’t see it addressing this, but I’m probably wrong. I think a clear example of how this is addressed with modules would be very beneficial.

[go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Sotirios Mantziaris
I was under the impression that go modules would do that kind of separation. When creating a module you define the module path. If the project is hosted in github, bitbucket or anywhere else should not matter. when calling go get github.com/user/application you refer just to the path where the re

Re: [go-nuts] I want to set the position of the window in GUI display of golang

2018-12-12 Thread Louki Sumirniy
I would expect at minimum there is a field in the type in the AssignTo field (it is a struct, I am guessing) that you could use. In VSCode you can control-click on type names and it opens up the declaration of the type (same for functions and variables too) On Monday, 10 December 2018 09:10:16

[go-nuts] Re: Json and value

2018-12-12 Thread Louki Sumirniy
I would be guessing that's because the response is actually thus an array (square brackets around anything mean a list of same-typed fields without keys) and you need to thus use response[0] to get it if there is only one, or process it in a for loop iterating using range. Probably you could als

[go-nuts] Re: Forking/transfering a repository and import paths

2018-12-12 Thread Louki Sumirniy
I have done this many times. Some repositories are more of a pain than others to move. I was amused to learn after having done this with github.com/btcsuite/btcd, that the btcjson, btcec, btcutil and btclog repos all were separate but quite tightly bound both to each other and it took me about

[go-nuts] Re: Json and value

2018-12-12 Thread olivier . galeote
Hi Thank you, but i have no response with your example. Maybe because i have [] around the json ? -- 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+uns

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Robert Engels
I agree and suggested that long ago Still, for the most part maven works pretty well and simplifies a lot of things. The global registry is not too different from godocs as a global repo of documentation... > On Dec 12, 2018, at 10:17 AM, Burak Serdar wrote: > >> On Wed, Dec 12, 2018 at 9

Re: [go-nuts] Re: [ANN] Geometric index Library

2018-12-12 Thread Robert Engels
I’m curious if you have any benchmarks or branches of the code prior to the assembly code and off heap memory management. This seems like an ideal case to test if things like that are worth the effort ? > On Dec 12, 2018, at 9:59 AM, 'David Chase' via golang-nuts > wrote: > > Before you have

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Sebastien Binet
On Wed, Dec 12, 2018 at 5:08 PM Robert Engels wrote: > Yes, but you still need to maintain both repos or things will break. > really? I am probably missing something. usually when you migrate a repo it's to leave one on the side of the road. by forking you sever all ties b/w the 2 repos and can

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Burak Serdar
On Wed, Dec 12, 2018 at 9:08 AM Robert Engels wrote: > > Yes, but you still need to maintain both repos or things will break. > > I am pretty sure that the correct solution is to decouple the package from > its location. And a global Go registry can tell Go get where that package can > currently

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Robert Engels
Yes, but you still need to maintain both repos or things will break. I am pretty sure that the correct solution is to decouple the package from its location. And a global Go registry can tell Go get where that package can currently be found. Then the package maintainer informs the global regi

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Sebastien Binet
On Wed, Dec 12, 2018 at 4:46 PM Sotirios Mantziaris wrote: > exactly that robert. :) > > On Wed, Dec 12, 2018 at 5:43 PM Robert Engels > wrote: > >> I think he is pointing out the problem I’ve asked about many times that >> using the specified import path so ‘go get’ works is a problem. If I wan

[go-nuts] Re: [ANN] Geometric index Library

2018-12-12 Thread 'David Chase' via golang-nuts
Before you have too many people depending on the current interfaces, would you consider replacing the point encoding of even/odd array elements with, say, "type Point struct { x, y float64}" ? I think it would be a more attractive interface. Would also be nice to use build tags to allow use of

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Sotirios Mantziaris
exactly that robert. :) On Wed, Dec 12, 2018 at 5:43 PM Robert Engels wrote: > I think he is pointing out the problem I’ve asked about many times that > using the specified import path so ‘go get’ works is a problem. If I want > to move my repos to another account all referencing code breaks. >

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Robert Engels
I think he is pointing out the problem I’ve asked about many times that using the specified import path so ‘go get’ works is a problem. If I want to move my repos to another account all referencing code breaks. The import paths need a logical reference. Think Java and package names. The packa

Re: [go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Wagner Riffel
Go has nothing to do with github, you can have any import path and how many repos you like as long as it exists on your file system inside $GOPATH/src -wgr On Wed, Dec 12, 2018, 10:13 AM Sotirios Mantziaris wrote: > Hi, > > i want to move a repo from my github account to another one. Goal is to

Re: [go-nuts] Is this interface nil?

2018-12-12 Thread Jan Mercl
On Wed, Dec 12, 2018 at 2:45 PM Teng Zhang wrote: > The above code shows b is not nil, can anybody help me figure out why? See: https://golang.org/doc/faq#nil_error PS: Please post source code as plain, black on white text. -- -j -- You received this message because you are subscribed to t

[go-nuts] Is this interface nil?

2018-12-12 Thread Teng Zhang
Hi All, I am confused by the interface and nil. var a *int = nil if a == nil { fmt.Println("aa") } var b interface{} = a if b == nil { fmt.Println("bb") } The above code shows b is not nil, can anybody help me figure out why? Regards, Teng -- You received this message because yo

[go-nuts] Re: Json and value

2018-12-12 Thread BombayCat
You may find this official blog helpful: https://blog.golang.org/json-and-go And here's a demo to write more idiomatic codes in this case. https://play.golang.org/p/V1DnpxFctxI On Wednesday, December 12, 2018 at 2:09:05 PM UTC+8, Olivier GALEOTE wrote: > > Hello, > > I trie to get value from api

[go-nuts] Forking/transfering a repository and import paths

2018-12-12 Thread Sotirios Mantziaris
Hi, i want to move a repo from my github account to another one. Goal is to have a new import path for the new forked repository. There are 2 ways of achieving the move: - Forking - Transfer repository Is it possible to fork a repo and change the import path of the repository? If the tra

Re: [go-nuts] Json and value

2018-12-12 Thread Ian Davis
On Wed, 12 Dec 2018, at 9:46 AM, olivier.gale...@gmail.com wrote: > i have the same response > [{"id": > 62,"nom":"TEST","URI":"http://192.168.0.31/param/","IP":"192.168.0.31","MacAdress":"DE:AD:BE:EF:FE:ED","created_at":"2018- > 12-06T20:44:57.131380+01:00","update_at":"2018-12- > 06T21:00:40.8

Re: [go-nuts] Json and value

2018-12-12 Thread olivier . galeote
i have the same response [{"id":62,"nom":"TEST","URI":"http://192.168.0.31/param/","IP":"192.168.0.31","MacAdress":"DE:AD:BE:EF:FE:ED","created_at":"2018-12-06T20:44:57.131380+01:00","update_at":"2018-12-06T21:00:40.847034+01:00","Localisation":2,"Type":1}] -- You received this message because

Re: [go-nuts] Json and value

2018-12-12 Thread Ian Davis
On Wed, 12 Dec 2018, at 6:03 AM, olivier.gale...@gmail.com wrote: > Hello, > > I trie to get value from api request > i have this response > [{"id": > 62,"nom":"TEST","URI":"http://192.168.0.31/param/","IP":"192.168.0.31","MacAdress":"DE:AD:BE:EF:FE:ED","created_at":"2018- > 12-06T20:44:57.131380

Re: [go-nuts] Re: Generics

2018-12-12 Thread Tharaneedharan Vilwanathan
This is great! Thanks for the details, michal! Regards dharani On Wed, Dec 12, 2018 at 12:27 AM wrote: > Google has it's own tool that is publicly available as part of gvisor > project [1] I think it's as good or better than the provided options. > I copied that to enable installation using pla

Re: [go-nuts] Re: Generics

2018-12-12 Thread michal
Google has it's own tool that is publicly available as part of gvisor project [1] I think it's as good or better than the provided options. I copied that to enable installation using plain go get (without bazel) [2]. We used that to de-interface github.com/fatih/set so you may see a real usage ex