[go-nuts] Re: Json Decode Failed

2020-04-14 Thread Ali Hassan
https://github.com/ali2210/HealthyTickets/ On Tuesday, April 14, 2020 at 6:53:32 PM UTC+5, Ali Hassan wrote: > > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw > this error } println("data:", visitor.Id

[go-nuts] Re: Json Decode Failed

2020-04-14 Thread Ali Hassan
Ok I will try this On Tuesday, April 14, 2020 at 6:53:32 PM UTC+5, Ali Hassan wrote: > > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw > this error } println("data:", visitor.Id) > > When I compile my

[go-nuts] Re: Json Decode Failed

2020-04-14 Thread Ali Hassan
db.Visitor struct + json which is defined in db package with Visitor On Tuesday, April 14, 2020 at 6:53:32 PM UTC+5, Ali Hassan wrote: > > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw > this error }

[go-nuts] Re: Address of function

2020-04-14 Thread ben.hoyt via golang-nuts
I also wanted this (when I was learning Go I just assumed & would work in front of any expression, including function calls). I opened proposal https://github.com/golang/go/issues/22647 where there was some discussion, and further discussion over at https://github.com/golang/go/issues/9097, whi

Re: [go-nuts] Writing data without synchronization

2020-04-14 Thread Slawomir Pryczek
Thanks for very insightful posts. That's actually what i was interested in, as i was wondering if x86 is so advanced to invalidate caches on its own, or it's taken care by software/compiler or if that's just pure coincidence that this code actually works :) Actually as i'm doing persistent conn

Re: [go-nuts] Writing data without synchronization

2020-04-14 Thread Ian Lance Taylor
On Tue, Apr 14, 2020 at 4:39 AM Slawomir Pryczek wrote: > > Hi Guys, was wondering about some things related to multithread code. > > 1. If data that is accessed or changed - it needs to go into CPU cache first, > and AFAIK to caches whole memory block not just this single area of memory on > wh

Re: [go-nuts] Address of function

2020-04-14 Thread Michał Łowicki
Please take a look at one of old threads about it - https://groups.google.com/forum/#!topic/golang-nuts/reaIlFdibWU. On Tue, Apr 14, 2020 at 12:50 PM wrote: > Hi, > > What is the reason for not allowing taking the address of a function > return value, ie having to assign it to a variable first?

Re: [go-nuts] Json Decode Failed

2020-04-14 Thread Michał Łowicki
Could you share the whole output from building? On Tue, Apr 14, 2020 at 2:53 PM Ali Hassan wrote: > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw > this error } println("data:", visitor.Id) > > When I

Re: [go-nuts] Address of function

2020-04-14 Thread Viktor Ogeman
Thanks Sent from my phone > On 14 Apr 2020, at 15:34, Michał Łowicki wrote: > >  > Please take a look at one of old threads about it - > https://groups.google.com/forum/#!topic/golang-nuts/reaIlFdibWU. > >> On Tue, Apr 14, 2020 at 12:50 PM wrote: >> Hi, >> >> What is the reason for not al

Re: [go-nuts] Json Decode Failed

2020-04-14 Thread burak serdar
On Tue, Apr 14, 2020 at 7:54 AM Ali Hassan wrote: > > dec :=json.NewDecoder(request.Body)//ok > var visitor db.Visitor > err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw this > error } println("data:", visitor.Id) > > When I compile my code it throw error like this 0xc54f

[go-nuts] Re: Json Decode Failed

2020-04-14 Thread Brian Candler
Can you make this as a full runnable example on play.golang.org ? What type is a "db.Visitor"? When I compile my code it throw error like this 0xc54f40 , 0xc32070. > It will show more than that. Please show the complete error message. -- You received this message because you are subscrib

[go-nuts] Json Decode Failed

2020-04-14 Thread Ali Hassan
dec :=json.NewDecoder(request.Body)//ok var visitor db.Visitor err := dec.Decode(&visitor);if err!= nil{ print("error", err) // throw this error } println("data:", visitor.Id) When I compile my code it throw error like this 0xc54f40 , 0xc32070. Please help me -- You received this messa

[go-nuts] Re: Writing data without synchronization

2020-04-14 Thread Brian Candler
On Tuesday, 14 April 2020 12:38:44 UTC+1, Slawomir Pryczek wrote: > > 1. If data that is accessed or changed - it needs to go into CPU cache > first, and AFAIK to caches whole memory block not just this single area of > memory on which we're operating. When we're doing writes without > synchroni

[go-nuts] Address of function

2020-04-14 Thread viktor . ogeman
Hi, What is the reason for not allowing taking the address of a function return value, ie having to assign it to a variable first? See https://play.golang.org/p/rjLwiVmikMc Regards -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

[go-nuts] Writing data without synchronization

2020-04-14 Thread Slawomir Pryczek
Hi Guys, was wondering about some things related to multithread code. 1. If data that is accessed or changed - it needs to go into CPU cache first, and AFAIK to caches whole memory block not just this single area of memory on which we're operating. When we're doing writes without synchronizatio

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-04-14 Thread Nicola Murino
Il 11/03/20 13:43, Nicola Murino ha scritto: Hi all, I want to share the performances analysis I recently did for SFTPGo, the fully featured and highly configurable SFTP server written in Go (https://github.com/drakkan/sftpgo). When I decided to write an SFTP server I evaluated the available

Re: [go-nuts] modules and indirect

2020-04-14 Thread Nick
Quoth Jérôme LAFORGE: > I am surprised that go mod tidy doesn't remove all unnecessary > dependencies from the go.mod. > > It raises some questions: > - Is it unsafe to do this kind of process to ensure that all unnecessary > dependencies are removed? > - Why go mod tidy doesn't remove them? > - H

[go-nuts] Re: Tools for managing licenses of dependencies

2020-04-14 Thread Michał Matczuk
I'm using https://github.com/src-d/go-license-detector with some bash scripting around it to list the modules. On Saturday, April 11, 2020 at 10:03:18 PM UTC+2, Victor Denisov wrote: > > Hi, > > Are there any tools that would allow to manage licenses of my go modules? > I would like to be able to

Re: [go-nuts] Re: [ANN] Unik, a Go unikernel capable of running Gio GUI programs

2020-04-14 Thread Elias Naur
On Mon Apr 13, 2020 at 2:06 PM, Brian Candler wrote: > --=_Part_1452_1022817720.1586811991060 > Content-Type: text/plain; charset="UTF-8" > > On Monday, 13 April 2020 19:42:17 UTC+1, Elias Naur wrote: > > > > The project is an experiment in a larger exploration of the question: > > "what if th

Re: [go-nuts] Re: [ANN] Unik, a Go unikernel capable of running Gio GUI programs

2020-04-14 Thread Elias Naur
On Mon Apr 13, 2020 at 4:15 PM, Michael Jones wrote: > IBM VM/370 and much that followed is exactly this “VM is a hardware > abstraction” line of reasoning. Logging into a user session was to > “IPL a > machine.” (Initial Program Load, imagine an IBM PC bios screen rushing > by) > Exactly. It was