[go-nuts] Re: Meet Golid : A Solid.js inspired framework written 100% in Go.

2025-05-04 Thread Justin Israel
I read your article and then looked at the code and was surprised to find that there wasn't much code there at all, vs what the article claims as a framework. The majority of the code is the dev server CLI tool. Is there more work meant to be added to match the "framework" description from the

Re: [go-nuts] Why is the error sent to original channel can still be received after recreating the channel?

2024-09-19 Thread Justin Israel
On Friday, September 20, 2024 at 8:52:46 AM UTC+12 robert engels wrote: Because the channel is captured by reference, so when the Go routine runs it already has the later value. Maybe this modified version better illustrates the problem: https://go.dev/play/p/XLekzv9wsVO The original code ha

Re: [go-nuts] Re: couldn't print numbers ordered with goroutine

2024-04-20 Thread Justin Israel
On Sun, Apr 21, 2024, 2:07 PM 'Dan Kortschak' via golang-nuts < golang-nuts@googlegroups.com> wrote: > On Sat, 2024-04-20 at 18:55 -0700, Robert Solomon wrote: > > channels are not queues, as Justin said > > They can be; buffered channels are queues. > > From https://go.dev/ref/spec#Channel_types

[go-nuts] Re: couldn't print numbers ordered with goroutine

2024-04-20 Thread Justin Israel
On Sunday, April 21, 2024 at 11:18:24 AM UTC+12 Taňryberdi Şyhmyradow wrote: Hello guys, For the following lines, I wanted to print numbers in ordered, but couldn't. Could you please help me and explain the reason Thanks in advance ``` numbers := []int{1, 2, 3, 4, 5} // Create a buffered chan

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-17 Thread Justin Israel
://github.com/periph/d2xx/blob/main/d2xx_posix_no_cgo.go but not on windows because this package uses dynamic linking on windows. Adapt as appropriate in your use case. I hope this helps. M-A Le lun. 16 oct. 2023, 21 h 13, Justin Israel a écrit : On Tuesday, October 17, 2023 at 10:40:33 AM

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-16 Thread Justin Israel
On Tuesday, October 17, 2023 at 10:40:33 AM UTC+13 Marc-Antoine Ruel wrote: I second Richard's suggestion. I used the same trick for https://github.com/periph/d2xx. This git repository contains a minimalist shim for the .a libraries and nothing else. It's designed to compile on any platform.

Re: [go-nuts] Re: Best IDE for GO ?

2023-08-26 Thread Justin Israel
On Sun, Aug 27, 2023 at 12:47 AM Mike Schinkel wrote: > If I understand what you are asking then JetBrains GoLand does. > > I do not know if there is a way to use the keyboard, but it does provides > links you can click when it displays the call stack on panic. > If your keymap configuration der

Re: [go-nuts] Best IDE for GO ?

2023-08-19 Thread Justin Israel
I usually hate this question and threads, because it's a bunch of people arguing that their solution is superior. There are always individuals stating how all they need is VIM or a plain text editor with no syntax highlighting. And then those like myself that feel very productive from the Jetbr

[go-nuts] Re: [RFC] Yet another proposal for Go2 error handling

2023-06-04 Thread Justin Israel
On Monday, June 5, 2023 at 4:17:17 AM UTC+12 Shulhan wrote: Dear gophers, I have been reading several proposals about error handling couple of months ago and today a light bulb come upon me, and then I write as much as I can think. I am not sure if its good or bad idea or even possible to i

Re: [go-nuts] Experience with building JS and Python bindings for a Go library

2023-05-23 Thread Justin Israel
For automatic python bindings I have used github.com/go-python/gopy https://github.com/justinfx/pygo-plugin/blob/main/go_plugin/client.go And for pure cpython bindings I have used: - py2: github.com/sbinet/go-python - py3: github.com/DataDog/go-python3 - Justin On Tuesday, May 23, 2023 at

Re: [go-nuts] Go + Imagemagick 7 + tight loop = CRASH!

2021-06-11 Thread Justin Israel
ction in a tight loop. The first two lines, which cure the > problem, > > were suggested by Justin Israel. Note: it doesn't always crash, but the > attached > > PNG fails 100% of the time. > > My understanding of what you are saying is that you have a way to > a

Re: [go-nuts] Re: Modules... why it has to be so painfull?

2021-04-09 Thread Justin Israel
On Sat, Apr 10, 2021 at 3:38 AM 'gonutz' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Justin Isreael said > > "Changes to ProjectB should be immediately available when compiling > ProjectA." > > which is not true when you simply insert a replace in your go.mod file. > > My current prob

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Justin Israel
On Thursday, April 8, 2021 at 12:14:40 PM UTC+12 Slawomir Pryczek wrote: > Thanks for all replies. Actually the docs are good (imo) just these > solutions proposed in docs are a horror. > > Inside root folder of the module... so im unable to share packages between > projects and code structur

[go-nuts] Re: Calling Go from Python

2021-04-06 Thread Justin Israel
On Wednesday, April 7, 2021 at 6:10:49 AM UTC+12 amitl...@gmail.com wrote: > > Hi, > A cheat-sheet I wrote for myself evolved into a full tutorial > on calling Go directly from Python > using ctypes and dll's, so I am happy to share it with the community. It

Re: [go-nuts] Contrary to popular opinion...

2021-02-28 Thread Justin Israel
On Monday, March 1, 2021 at 9:36:57 AM UTC+13 ren...@ix.netcom.com wrote: > I think the only time the indentation is a problem is when refactoring > code - copying pasting code blocks seems to be a guessing game with my IDEs > and often require manual fixes - the issue seems far less common (a

Re: [go-nuts] What are debian:buster-slim advantages vs alpine ones?

2020-12-17 Thread Justin Israel
On Friday, December 18, 2020 at 10:31:46 AM UTC+13 za...@zrhoffman.net wrote: > In our project we'd chosen debian-slim images vs alpine few years ago due >> to a number of reasons, if I recall arguments were like: >> >> 1. presence of libc >> > > There are reasons to choose other images over

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-16 Thread Justin Israel
On Friday, July 17, 2020 at 11:21:32 AM UTC+12 va...@selfip.ru wrote: > вт, 14 июл. 2020 г. в 18:39, Jake Montgomery : > > > > I agree, it seems like an unfortunate oversight. You can do it without > the slice tricks: https://play.golang.org/p/tNAPOcQqApN > > It does take an additional Sprin

Re: [go-nuts] Re: Tracking down RSS growth in cgo library

2020-05-24 Thread Justin Israel
On Mon, May 25, 2020, 7:12 AM Ian Lance Taylor wrote: > On Sat, May 23, 2020 at 8:39 PM Justin Israel > wrote: > > > > On Sat, May 23, 2020 at 5:19 PM Justin Israel > wrote: > >> > >> I've been working to track this down for 2 days now and I'm

[go-nuts] Re: Tracking down RSS growth in cgo library

2020-05-23 Thread Justin Israel
On Sat, May 23, 2020 at 5:19 PM Justin Israel wrote: > I've been working to track this down for 2 days now and I'm just taking a > long shot to see if anyone might have a new idea for me. > My cgo-based bindings library seems to have unbounded RSS memory growth, > whi

[go-nuts] Tracking down RSS growth in cgo library

2020-05-22 Thread Justin Israel
I've been working to track this down for 2 days now and I'm just taking a long shot to see if anyone might have a new idea for me. My cgo-based bindings library seems to have unbounded RSS memory growth, which I have been able to reduce to the smallest benchmark test and even pinpoint the exact cal

Re: [go-nuts] help w/ therecipe/qt

2020-03-01 Thread Justin Israel
On Mon, Mar 2, 2020 at 6:48 AM rob wrote: > The exact problem is one of the first in chapter 4 > > MainWindow::MainWindow() > { > setWindowTitle("SRM System"); > setFixedSize(500, 500); > QPixmap newIcon("new.png"); > QPixmap openIcon("open.png"); > QPixmap closeIcon("close.pn

[go-nuts] help w/ therecipe/qt

2020-02-29 Thread Justin Israel
You are likely to get the most focused support by checking with the project: https://github.com/therecipe/qt/blob/master/README.md Maybe asking on their slack channel if you can't figure it out from the Qt docs + therecipe/qt api? -- You received this message because you are subscribed to the

[go-nuts] Re: A question !

2020-01-04 Thread Justin Israel
On Sunday, January 5, 2020 at 7:28:24 AM UTC+13, Motaz Hejaze wrote: > > > 1 - Is there really a big performance ( speed ) difference between using > Python OR Golang in backend web development ? > There are a number of reasons why Go *could* out-perform Python when comparing django to a Go w

[go-nuts] distributed runtime

2020-01-03 Thread Justin Israel
Seems like it would just be easier to explicitly schedule work over something like nats.io At least you would have 100% control over what is distributed over the network. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Appending static libraries to cgo LDFLAGS.

2019-12-18 Thread Justin Israel
On Thursday, December 19, 2019 at 11:23:41 AM UTC+13, Bruno Albuquerque wrote: > > I am trying to get a version of GoCV that works with OpenCV static > libraries. The final issue I have is that pkg-config is not really listing > all required libraries so i need to append some extra ones. Here

Re: [go-nuts] Re: buildmode=c-archive and statically linking into another lib

2019-08-27 Thread Justin Israel
d/go/#hdr-Build_modes > 在 2016年5月18日星期三 UTC+8上午11:11:57,Justin Israel写道: >> >> I'm wondering if someone can tell me if this is either a limitation of >> buildmode=c-archive static libs, or if I am really just doing something >> wrong. >> >> Problemat

[go-nuts] Re: buildmode=c-archive and statically linking into another lib

2019-08-09 Thread Justin Israel
recent activity that relates to both your musl compiler issue and my original issue: https://github.com/golang/go/issues/29674 This is specifically targeting Android issues it seems. I stopped trying to use Go C shared libraries in C++ libs/plugins after this post, since it couldn't cope wi

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-12 Thread Justin Israel
hing stripped back so far. But at least you are happy with your results! > On Sat, Jun 8, 2019 at 10:54 PM Justin Israel > wrote: > > > > I'm wondering about a couple factors in this comparison that seem to > make a difference in my local test: > > > > I thin

[go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-08 Thread Justin Israel
I'm wondering about a couple factors in this comparison that seem to make a difference in my local test: 1. I think perl sockets are write buffered. So would the equivalent be to wrap the net.Conn in bufio.NewWriter(c) and flush before the Close? 2. Since this is a straigh-line test whe

[go-nuts] Re: Go package manager

2019-05-31 Thread Justin Israel
On Saturday, June 1, 2019 at 12:43:50 AM UTC+12, yashi...@gmail.com wrote: > Hi everyone! > > I recently build an interesting Go tool - GPM (Go Project Manager). It allows > you to build and manage go projects. Ont op, it also allows to update version > of Go from cli. > Check it out: https://gi

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-05-01 Thread Justin Israel
nly the first word from the value field. >>> >>> Actual: >>> >>> sentfileid: - Fp5PpR2roT6uPnte47 image/gif >>> sentmimetype: Fp5PpR2roT6uPnte47 image/gif >>> rcvdfileid: image/gif >>> >>> Expected: >>> >

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-05-01 Thread Justin Israel
ing into a slice of individual characters. >> > You could use something like this: https://play.golang.org/p/fcE2UJEUFPy That example has the option of only converting a fixed number of bytes from the C string to the Go string, if you know how big the prefix is. > >> Thanks >> >&

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-04-30 Thread Justin Israel
On Wednesday, May 1, 2019 at 7:06:47 AM UTC+12, Nitish Saboo wrote: > > Apologies.I did this 'strings.Split(C.GoString(*C.char),""). > I am getting 'Incompatible types' compilation error. > Are you literally doing this? strings.Split(C.GoString(*C.char),"") Something like this should be wor

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
r stuff in the server. I think it just indicates that I have turned over a lot of client connections over time. > > On Monday, 29 April 2019 23:25:52 UTC-7, Justin Israel wrote: >> >> >> >> On Tue, Apr 30, 2019 at 6:09 PM vaastav anand >> wrote: >> &

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
ne doing so in this application. > > On Monday, 29 April 2019 22:57:40 UTC-7, Justin Israel wrote: >> >> >> >> On Tue, Apr 30, 2019 at 5:43 PM vaastav anand >> wrote: >> >>> I'd be very surprised if the anonymous goroutine is the reason behin

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
1.12 causes this. > > > On Monday, 29 April 2019 21:59:34 UTC-7, Justin Israel wrote: >> >> >> On Thursday, November 29, 2018 at 6:22:56 PM UTC+13, Justin Israel wrote: >>> >>> >>> >>> On Thu, Nov 29, 2018 at 6:20 PM Justin Israel &

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
On Thursday, November 29, 2018 at 6:22:56 PM UTC+13, Justin Israel wrote: > > > > On Thu, Nov 29, 2018 at 6:20 PM Justin Israel > wrote: > >> On Thu, Nov 29, 2018 at 5:32 PM Ian Lance Taylor wrote: >> >>> On Wed, Nov 28, 2018 at 7:18 PM Justin Israel &g

[go-nuts] Re: which is best thrift client pooling driver supported in golang.

2019-04-14 Thread Justin Israel
On Sunday, April 14, 2019 at 10:18:00 PM UTC+12, shrin...@gmail.com wrote: > > which is best thrift client pooling driver supported in golang (means > which is optimized according to performance ) > Do any of them even do client pooling? I would be interested to know. I've had to handle my own

[go-nuts] Re: [URGENT] Pass array of string between Go and C library

2019-03-28 Thread Justin Israel
On Friday, March 29, 2019 at 11:08:06 AM UTC+13, Ashutosh Baghel wrote: > > Hi folks, > > I am new to Go-Programming and having the following requirement, I need > to have Array of Strings,(for example names) at my 'Go Side' . > > But i would get this names from my C library API which i have in

Re: [go-nuts] This Makes No Sense

2019-01-21 Thread Justin Israel
On Tue, Jan 22, 2019 at 11:40 AM John wrote: > Dear Gophers, > > I have recently made a project of Connect Five. When the imput is wrong it > will have a goroutine problem that says something about out of index, as my > game win function depends on if the x = b and x+1 = b and so on. But if the >

Re: [go-nuts] Statically compile and link a go program with C dependencies

2019-01-21 Thread Justin Israel
On Tue, Jan 22, 2019, 8:27 AM snmed wrote: > Hi thanks, > > Ah yes, it seems that i forgot that with the static library. Now i've the > static library under ./libs folder and i use this command: > go build -ldflags '-L./libs -w -extldflags "-static"' -a > > but now i get this message: > flag prov

Re: [go-nuts] Dependency hell with Go modules

2019-01-17 Thread Justin Israel
On Fri, Jan 18, 2019, 12:36 AM Francis Chuang wrote: > Hey everyone, > > I was wondering if I can get some ideas on how to solve this dependency > problem with Go modules. I am using Go 1.11.4 on Linux (Windows Subsystem > for Linux to be exact). > > The first part of the problem is that for one

Re: [go-nuts] What is the main purpose of godoc?

2019-01-15 Thread Justin Israel
On Wed, Jan 16, 2019, 11:41 AM 伊藤和也 wrote: > I added some commets to the source file which belongs to "main" package > but the comments doesn't appear in godoc in html but it appears when it > belongs to other package "hello". > godoc is meant to provide automatically generated documentation abo

Re: [go-nuts] what is the use of context in golang RESTful apis?

2019-01-13 Thread Justin Israel
On Mon, Jan 14, 2019, 2:23 AM Mahendra Bhoir wrote: > APIs I have written are for mobile applications and request cancellation > doesn’t happen much on mobile applications. What if the mobile client closes the app in the middle of an expensive request? I think I am little confused with uses of

Re: [go-nuts] Re: how do I make my function always run at exit in `go test`?

2019-01-10 Thread Justin Israel
dn't work. I confirmed it on an Ubuntu distro. > 2019년 1월 10일 목요일 오후 2시 41분 24초 UTC+9, Justin Israel 님의 말: >> >> Oh, I see. Well also adding a signal handler for SIGINT/SIGTERM also >> works for me: >> https://play.golang.org/p/93VmTTgE4YB >> >> Justin >>

Re: [go-nuts] Re: how do I make my function always run at exit in `go test`?

2019-01-09 Thread Justin Israel
Oh, I see. Well also adding a signal handler for SIGINT/SIGTERM also works for me: https://play.golang.org/p/93VmTTgE4YB Justin On Thu, Jan 10, 2019 at 6:29 PM 김용빈 wrote: > Sorry I didn't clarify but I mean when it is killed/terminated. > > 2019년 1월 10일 목요일 오후 2시 24분 35초 UTC+9, 김용빈 님의 말: > >>

Re: [go-nuts] Re: Temporarily allow unused variables

2019-01-09 Thread Justin Israel
On Thu, Jan 10, 2019 at 6:04 PM 김용빈 wrote: > package main > > func unused(x interface{}) {} > > func main() { > a := 1 > unused(a) > } > The function isn't even required here. Assigning to underscore will prevent the error: func main() { a := 1 _ = a } > > 2012년 3월 7일 수요일 오후 8

Re: [go-nuts] how do I make my function always run at exit in `go test`?

2019-01-09 Thread Justin Israel
On Thu, Jan 10, 2019 at 6:24 PM 김용빈 wrote: > I tried signal.Notify but it seems it doesn't work. > > Then I find this: > https://github.com/golang/go/issues/15553#issuecomment-217162874 > > So what should I do to make my function always run at exit in test? > A custom TestMain() is a good way to

Re: [go-nuts] Can I say that a pointer is a memory address where a variable is?

2019-01-09 Thread Justin Israel
On Thu, Jan 10, 2019, 7:53 AM Justin Israel wrote: > > > On Thu, Jan 10, 2019, 7:43 AM 伊藤和也 wrote: > >> Can I say that a pointer is a memory address where a variable is? >> > > A pointer is a memory address to a value (data in memory). > > A "variable&q

Re: [go-nuts] Can I say that a pointer is a memory address where a variable is?

2019-01-09 Thread Justin Israel
On Thu, Jan 10, 2019, 7:43 AM 伊藤和也 wrote: > Can I say that a pointer is a memory address where a variable is? > A pointer is a memory address to a value (data in memory). A "variable" is just a name/label to *something*. That something could be a pointer or it could be a value. That is, you can

Re: [go-nuts] [Ann] create full github release from command line, not just a tag

2019-01-06 Thread Justin Israel
I've been using goreleaser so far, to publish github releases with cross-compiled assets. I am not familiar with the wireframe project though. Do they share some overlap? On Mon, Jan 7, 2019 at 5:50 PM Tong Sun wrote: > IIRC, github used to create full releases each tim

Re: [go-nuts] missing fmt.Error(...interface{})

2018-12-30 Thread Justin Israel
ss now is that it *could* have been in the errors package if the errors package had been created at the same time as the fmt package, but it was added later after fmt.Errorf already existed. > > On Sun, Dec 30, 2018, 12:15 AM Justin Israel wrote: > >> >> >> On Sun,

Re: [go-nuts] Using of packages

2018-12-30 Thread Justin Israel
On Sun, Dec 30, 2018, 5:02 PM wrote: > I'm a beginner in Golang and quite confusing about using packages in a > program. For example, every non simple software has a bunch of classes and > interfaces or utility classes which are usually lokated in different > packages in the same program. So usin

Re: [go-nuts] missing fmt.Error(...interface{})

2018-12-30 Thread Justin Israel
On Sun, Dec 30, 2018, 7:24 PM Liam Breck wrote: > What's the rationale for omission of: > fmt.Error(a ...interface{}) error > What does it mean for this function to accept a variable number of arguments when there is no formatting or printing implied by the name of the function? > Given that

Re: [go-nuts] Closure, recursion and higher-order functions

2018-12-29 Thread Justin Israel
On Sun, Dec 30, 2018 at 5:07 AM 伊藤和也 wrote: > How often do you use closure, recursion and higher-order functions? > I use closuresquite often, and recusion here and there as needed. > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsu

Re: [go-nuts] go modules go build fails - normal go build with $GOPATH set works

2018-12-25 Thread Justin Israel
On Wed, Dec 26, 2018, 3:07 PM Sam Whited wrote: > 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 h

Re: [go-nuts] go get can not download git submodule

2018-12-24 Thread Justin Israel
On Tue, Dec 25, 2018, 4:17 PM xiang liu wrote: > Thanks a lot! > > It seems go 1.11 does not support git submodule. go 1.10 works fine. > Oh, I wonder if they ended up getting rid of it as alluded to in that issue. Or if it's hidden behind a mode controlled by an env var.

Re: [go-nuts] go get can not download git submodule

2018-12-24 Thread Justin Israel
On Tue, Dec 25, 2018, 5:59 AM xiang liu wrote: > Hi: > > Now i have go package have another c++ submodule, > https://github.com/notedit/media-server-go > > I wan to make it go gettable, but go get can not check the c++ submodule. > > Any way to fix this? > I see this discussed here: https://git

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Justin Israel
On Wed, Dec 19, 2018, 5:31 AM Chris Burkert wrote: > Hello Ian, all, > yes, the workers generate multiple results. I was able to use your > proposal with the waiting goroutine which closes the channel. Unfortunately > my initial minimal example was not so minimal. It is a little more > complicate

Re: [go-nuts] Is it possible to go test files priority

2018-12-17 Thread Justin Israel
On Tue, Dec 18, 2018, 8:01 AM wrote: > Hi all, Is it possible to set priority to go test files. As per my > observation go tool runs test cases in alphabetical order of file name. Now > I want to run files with custom priority. Is it possible? > I don't have a direct answer but I feel if it were

Re: [go-nuts] [ANN] pyg: python 3.7.1 bindings for Go

2018-12-16 Thread Justin Israel
Thanks for sharing this. I've been using github.com/sbinet/go-python on a few tasks. Is this generally the same thing, but for py 3.x? On Sun, Dec 16, 2018, 6:30 PM Jason E. Aten wrote: > `pyg` is a library for embedding python 3.7.1 in Go. > > Very little of `pyg` is mine. I consolidated a bunc

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] Re: Starlight - run python inside Go to extend your applications - easily

2018-12-10 Thread Justin Israel
On Mon, Dec 10, 2018, 9:39 PM wrote: > > > On Friday, December 7, 2018 at 9:05:02 PM UTC+1, Nate Finch wrote: >> >> I’d like to announce starlight - >> https://github.com/starlight-go/starlight. >> >> >> Starlight wraps google’s Go implementation of the starlark python dialect >>

Re: [go-nuts] recursion plus goroutines

2018-11-30 Thread Justin Israel
On Sat, Dec 1, 2018, 10:43 AM Alex Dvoretskiy wrote: > Here is recursion. I d'ont know when its end. > Do you mean that you want to wait for all 3 goroutines to complete? var wg sync.WaitGroup wg.Add(3) go func() { inOrderTr(root) wg.Done() }() go func() { preOrderTr(root) wg.

Re: [go-nuts] Cause of SIGBUS panic in gc?

2018-11-28 Thread Justin Israel
On Thu, Nov 29, 2018 at 6:20 PM Justin Israel wrote: > On Thu, Nov 29, 2018 at 5:32 PM Ian Lance Taylor wrote: > >> On Wed, Nov 28, 2018 at 7:18 PM Justin Israel >> wrote: >> > >> > I've got a service that I have been testing quite a lot over the las

Re: [go-nuts] Cause of SIGBUS panic in gc?

2018-11-28 Thread Justin Israel
On Thu, Nov 29, 2018 at 5:32 PM Ian Lance Taylor wrote: > On Wed, Nov 28, 2018 at 7:18 PM Justin Israel > wrote: > > > > I've got a service that I have been testing quite a lot over the last > few days. Only after I handed it off for some testing to a colleague,

[go-nuts] Cause of SIGBUS panic in gc?

2018-11-28 Thread Justin Israel
I've got a service that I have been testing quite a lot over the last few days. Only after I handed it off for some testing to a colleague, was he able to produce a SIGBUS panic that I had not seen before: go 1.11.2 linux/amd64 The service does set up its own SIGINT/SIGTERM handling via the typic

Re: [go-nuts] gosnip: run small snippets of Go code from the command line

2018-11-24 Thread Justin Israel
On Sun, Nov 25, 2018, 11:06 AM Ben Hoyt wrote: > I just finished a little tool called "gosnip" that allows you to run > little snippets of Go code from the command line: > > https://github.com/benhoyt/gosnip > > To use it, just type something like: > > $ gosnip 'fmt.Println("Hello world")' >

Re: [go-nuts] Re: go language sensitive editor?

2018-11-20 Thread Justin Israel
On Wed, Nov 21, 2018, 12:37 PM wrote: > I recommend Sublime Text with the GoSublime > addon package. There's a free > trial for Sublime Text . > I started with this, and have also tried AnacondaGo for Sublime, but went back

Re: [go-nuts] go modules and vendor: redundant features?

2018-11-16 Thread Justin Israel
On Sat, Nov 17, 2018 at 6:15 PM Justin Israel wrote: > > > On Sat, Nov 17, 2018 at 6:06 PM Robert Engels > wrote: > >> I think that is incorrect. The vendoring was a way to ensure certain >> dependencies remained constant. The modules should eliminate that, barrin

Re: [go-nuts] go modules and vendor: redundant features?

2018-11-16 Thread Justin Israel
g made it so that your build would prefer that location over your GOPATH, and the module system provides a versioned cache now. I still like the idea of being able to vendor if that makes the most sense. > > On Nov 16, 2018, at 11:00 PM, Justin Israel > wrote: > > > > On S

Re: [go-nuts] go modules and vendor: redundant features?

2018-11-16 Thread Justin Israel
On Sat, Nov 17, 2018 at 5:34 PM 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 > find a way to consolidate them under a single unified feature. > Comparing "modules" and "ven

Re: [go-nuts] help(rest call failed)

2018-11-12 Thread Justin Israel
On Tue, Nov 13, 2018, 5:23 AM wrote: > I just want to send a rest call with golang, but it failed, the error > message : {"header":{"code":201,"desc":"param data not exist"}} .(but > when I send rest request with postman ,it success) > the code as follow > > 1 package main > 2 > 3 import

[go-nuts] Re-building module with -buildmode=c-shared doesn't cache well

2018-10-31 Thread Justin Israel
(cross-posted from r/golang ) I've noticed a great improvement with caching when I build modules that haven't changed. The execution of "go build" is quite fast, and it is nice in a larger build script

Re: [go-nuts] Correct way to solve slice of interface type problem

2018-10-30 Thread Justin Israel
g to hide complexity. It wouldn't be "free" to do it (as far as I know) and I doubt the Go maintainers want it to hide the copy into the new slice. My 2 cents. > > > On Oct 30, 2018, at 7:30 PM, Justin Israel wrote: > > > > On Wed, Oct 31, 2018 at 11:21 AM wrote

Re: [go-nuts] Correct way to solve slice of interface type problem

2018-10-30 Thread Justin Israel
On Wed, Oct 31, 2018 at 11:21 AM wrote: > Hello, everyone. > Consider following code: > > package main > import "fmt" > > type implementation struct { > d []int} > > func (impl *implementation) getData() interface{} { > return impl.d} > > type phase struct{} > > type data interface { >

[go-nuts] Variadic functions using ...interface{}

2018-10-21 Thread Justin Israel
I was getting an error trying to pass a []string to this elasticsearch API ctor: https://github.com/olivere/elastic/blob/v6.2.11/search_queries_terms_set.go#L26 func NewTermsSetQuery(name string, values ...interface{}) *TermsSetQuery And it was failing with "cannot use vals (type []string) as typ

Re: [go-nuts] Go modules and replace

2018-10-19 Thread Justin Israel
On Sat, Oct 20, 2018, 11:34 AM Mark Volkmann wrote: > > On Oct 19, 2018, at 4:48 PM, Justin Israel wrote: > > > > On Sat, Oct 20, 2018, 9:42 AM Mark Volkmann > wrote: > >> I have a simple demo application that wants to use a package that is on >> my lo

Re: [go-nuts] Go modules and replace

2018-10-19 Thread Justin Israel
On Sat, Oct 20, 2018, 9:42 AM Mark Volkmann wrote: > I have a simple demo application that wants to use a package that is on my > local file system. > The code for the package is in /Users/Mark/foo/bar. > This directory contains the file bar.go which contains: > > package bar > import "fmt" > fun

Re: [go-nuts] Temporary files in go

2018-10-11 Thread Justin Israel
On Fri, Oct 12, 2018, 2:31 PM Ian Lance Taylor wrote: > On Thu, Oct 11, 2018 at 4:48 PM, Greg Saylor > wrote: > > > > In other programming languages (this is specific to Linux/Unix systems), > in > > the past to ensure security in the even of a program crash, we would do > > something like: > >

Re: [go-nuts] Importing local package

2018-10-09 Thread Justin Israel
On Wed, Oct 10, 2018, 5:49 AM D Whelp wrote: > Hello all, > > Super new to Golang, loving the hell out of it, but I am running into a > small issue. I have a small application that I am working through. I can > import my models using `import ("/dojo/pkg/models")` in main.go just fine. > Now I a

[go-nuts] Re: modules: Using vendored transitive dependencies of primary dependency

2018-10-01 Thread Justin Israel
Since I never found an answer to this, and I am still stumped, I have cross-posted here <https://stackoverflow.com/questions/52600915/go-modules-using-vendored-transitive-dependencies-of-primary-dependency> . Justin On Thursday, September 6, 2018 at 9:34:36 AM UTC+12, Justin Israel

Re: [go-nuts] using 'go function_call()' inside Go program

2018-09-29 Thread Justin Israel
On Sun, Sep 30, 2018 at 3:47 PM Hemant Singh wrote: > I have a question. I have changed the open goping.go code to return error > from functions. > > The following function is implemented in a .goping.go file. > > func ping(config *Config, address, name string, pattern *regexp.Regexp) > error {

Re: [go-nuts] having issues setting up favicon.ico on my site

2018-09-27 Thread Justin Israel
On Fri, Sep 28, 2018, 6:18 AM Grey White wrote: > Good day guys, > I need help with attaching favicon.ico to my site > that is my folder structure. > i really can't tel what am doing wrong > > [image: Capture.PNG] > func main() { >http.HandleFunc("/favicon", faviconHandler) >log.Fatal(htt

Re: [go-nuts] Updating a struct from goroutines

2018-09-25 Thread Justin Israel
On Wed, Sep 26, 2018, 6:38 AM wrote: > Hi, new gopher here. > I considered asking this on SO, but they (rightly, IMO) discourage "Is > this a good way to do it?" questions. Hope that's ok here. > > By way of background, I'm porting a largish industrial control application > from Python to Go. T

[go-nuts] Re: When using 'go mod vendor' why are there lots of files missing?

2018-09-23 Thread Justin Israel
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 behavior: > > usage: go mod vendor [-v] >> >> Vendor resets the main module's vendor directory to include all packages >> needed to build and test all the main module's

Re: [go-nuts] Re: Help tracking down module dependencies

2018-09-23 Thread Justin Israel
gotest.tools v0.0.0' in your > go.mod file). > > --thepudds > > On Sunday, September 23, 2018 at 7:59:36 PM UTC-4, Justin Israel wrote: >> >> I'm converting one of my internal projects from glide to a module, after >> having done two other conversions. B

[go-nuts] Help tracking down module dependencies

2018-09-23 Thread Justin Israel
I'm converting one of my internal projects from glide to a module, after having done two other conversions. But I am hitting a problem that I can't yet solve. $ GO111MODULE=on go mod tidy -v Fetching https://gotest.tools?go-get=1 https fetch failed: Get https://gotest.tools?go-get=1: Forbidden go

Re: [go-nuts] How can I run a method in a subprocess in golang?

2018-09-21 Thread Justin Israel
On Sat, Sep 22, 2018, 8:24 AM 'ggyft' via golang-nuts < golang-nuts@googlegroups.com> wrote: > My use case is that I am designing a scheduler that schedules various > health checks (go method) periodically. Earlier I want to model run them in > a new goroutine. But I ran into problems when I want

Re: [go-nuts] go modules and Dockerfile

2018-09-19 Thread Justin Israel
On Thu, Sep 20, 2018, 6:09 AM Sotirios Mantziaris wrote: > hi, > > i am trying to build a container that supports modules and i get the > following error: > > ↳ docker build . -t test > >  1 ↵  > 4.91G RAM  0.00K SWP  21:04:0

Re: [go-nuts] Announcing a Fyne GUI toolkit

2018-09-17 Thread Justin Israel
I've hit a couple issues with the bootstrap on ubuntu 16.04 and have been logging them as I find them: https://github.com/fyne-io/bootstrap/issues On Tue, Sep 18, 2018 at 9:04 AM Tharaneedharan Vilwanathan < vdhar...@gmail.com> wrote: > Hi, > > Anyone having trouble installing on a Mac or am I al

Re: [go-nuts] Run time error

2018-09-17 Thread Justin Israel
Your stack trace isn't long enough to see the usage of ipfs leading up to the crash. And your example code doesn't show usage of that library. Somewhere in there you must have a nil pointer to a RequestBuilder, on which Send() is being called. On Tue, Sep 18, 2018, 3:42 AM akshita babel wrote: >

Re: [go-nuts] Golang equivalent of Python's context manager

2018-09-12 Thread Justin Israel
On Thu, Sep 13, 2018, 10:13 AM Mirko Friedenhagen wrote: > Thanks again. I think some of the use cases, especially those which > implement some kind of finally (which includes locking use case) may just > be implemented with simple functions. At least throwing exceptions is a > rare event in Gola

Re: [go-nuts] Golang equivalent of Python's context manager

2018-09-12 Thread Justin Israel
For about the same amount of typing that you have to do to create a closure for using with a predefined WithContext handler, I tend to do this inline: func start() { fmt.Println("start") } func stop() { fmt.Println("stop") } func main() { func() (string, error) { start() defer

[go-nuts] Re: modules: Using vendored transitive dependencies of primary dependency

2018-09-05 Thread Justin Israel
On Wednesday, September 5, 2018 at 6:31:03 PM UTC+12, Justin Israel wrote: > > I've been having some great results converting some of my internal > projects from glide to go modules, but I am looking at a specific workflow > right now that is confusing me. Hoping to get s

[go-nuts] modules: Using vendored transitive dependencies of primary dependency

2018-09-04 Thread Justin Israel
I've been having some great results converting some of my internal projects from glide to go modules, but I am looking at a specific workflow right now that is confusing me. Hoping to get some clarification... Project 'foo' has its dependencies vendored via "go mod vendor". This works great when b

Re: [go-nuts] go mod impressions

2018-09-01 Thread Justin Israel
On Sat, Sep 1, 2018, 11:43 AM Vasily Korytov wrote: > Hi, > > I've experimented with GO111MODULE preview in Go 1.11 release, two things > to note so far: > 1. go mod vendor pulled in vendor folder the .travis.yml file which > apparently I don't want there (govendor filters it by default) > > 2. I

Re: [go-nuts] Re: Is the go 1.11 godoc tool 'module-aware'?

2018-08-30 Thread Justin Israel
neat to generate html docs with our deploys. > - Agniva > > > On Thursday, 30 August 2018 01:02:48 UTC+5:30, Justin Israel wrote: >> >> Thanks for that update, Paul! >> >> On Thu, Aug 30, 2018, 2:07 AM Paul Jolly wrote: >> >>> Perhaps better (because of t

Re: [go-nuts] Re: Is the go 1.11 godoc tool 'module-aware'?

2018-08-29 Thread Justin Israel
t; > > In https://github.com/golang/go/wiki/Modules or a new page ? > > > > On 29-08-2018, Paul Jolly wrote: > > > --50127c057491b176 > > > Content-Type: text/plain; charset="UTF-8" > > > > > > Please see https://github.com/

[go-nuts] Is the go 1.11 godoc tool 'module-aware'?

2018-08-28 Thread Justin Israel
I've been trying out converting some of our internal projects to go 1.11 using modules instead of glide. We have a build system that provides the ability to generate html docs via "godoc" and I am wondering if godoc has been made "module-aware" in go 1.11? My particular project is using the mig

  1   2   >