[go-nuts] What happened to the Pholcus crawler?

2019-12-26 Thread Darko Luketic
I had a notification about some issue I commend on in https://github.com/henrylee2cn/pholcus Pholcus was a crawler written in Go, no English docs. I starred it, along with about 6200 others. I assume the guy was bullied by the Chinese government or parts of it, maybe killed, who knows,

[go-nuts] Re: go mod dependency hell is real

2019-09-13 Thread Darko Luketic
Hey Sam and Pudds, thanks for feedback and help. v1.1.7 helped. I must say go.mod is growing on me, but it's still hindering productivity or let's say a step back. If you use Goland, which probably most mousepushers like me use, since everything is under ~/go/pkg/ even with modules enabled in

[go-nuts] Re: go mod dependency hell is real

2019-09-10 Thread Darko Luketic
The answer is apparently https://github.com/gin-gonic/gin/issues/2039#issuecomment-527997733 Add this to your go.mod file: > replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go > v0.0.0-20190204201341-e444a5086c43 On Tuesday, September 10, 2019 at 2:48:25 PM UTC+2, Darko Luke

[go-nuts] go mod dependency hell is real

2019-09-10 Thread Darko Luketic
What used to work pre go 1.13 now doesn't work anymore go mod is one big mess no one needs and complicates everything I'm now getting ambiguity. How do I resolve it? Nothing compiles anymore ✘ darko@wrk  ~/go/src/git.icod.de/dalu/socialthing   master ●✚  go mod tidy go: extracting

Re: [go-nuts] Go+ replacement

2019-04-23 Thread Darko Luketic
But Twitter is a loose group of individuals, or does it have group functionality now? Everything is done via #channels last time I checked. I honestly very rarely use it, too small sized posts, it's very chaotic and stuff you've seen just now is gone after a reload and can't be found again. Also

[go-nuts] A modular approach, plugins, lifecycle and wasm

2019-01-15 Thread Darko Luketic
I'm currently writing a forum, I've been doing that for a few months now. You know how people have a plushi next to the they can talk to in order to develop ideas, this is my plushi. And while writing I've been thinking of all the great forum software PHP has, vbulletin, phpbb to name the most

[go-nuts] Re: json and interface unmarshalling

2018-12-14 Thread Darko Luketic
r the MessageRequest is unmarshalled I can check for the type and then payload := new(model.ChatMessage) if e := json.Unmarshal(m.Payload, payload); e != nil { logrus.Error(e) return } On Friday, December 14, 2018 at 8:17:25 PM UTC+1, Darko Luketic wrote: > > Hello, > > I'm

[go-nuts] json and interface unmarshalling

2018-12-14 Thread Darko Luketic
Hello, I'm sending messages over websocket. I have a "generic" MessageRequest and MessageResponse struct. type MessageRequest struct { Typestring `json:"type"` Payload interface{} `json:"payload"` } type MessageResponse struct { Typestring `json:"type"` Payload

[go-nuts] Re: ast Field's type

2018-04-17 Thread Darko Luketic
I solved it by experimenting. *ast.Ident for the "string" *ast.SelectExpr for the package type Seems like there is no easier way. On Tuesday, April 17, 2018 at 7:55:13 PM UTC+2, Darko Luketic wrote: > > Hi, > > I'm trying to parse a file (or rather more files, but l

[go-nuts] ast Field's type

2018-04-17 Thread Darko Luketic
Hi, I'm trying to parse a file (or rather more files, but let's keep it simple). package models import "github.com/globalsign/mgo/bson" type Community struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` OwnerId string`bson:"owner_id" json:"owner_id"`

[go-nuts] math type algo question and Go's int size

2018-04-08 Thread Darko Luketic
Yeah I'm not a math wiz and the older I get the harder I find maths. But sometimes you can't evade maths in programming. So here's my question for math wizards. Essentially, I'm trying to write an url shortener. And I found this package I agree with (don't re-invent the wheel)

[go-nuts] Re: using gofmt "internally" to format a string, aka in memory go code formatter

2018-03-26 Thread Darko Luketic
Thank you everyone On Monday, March 26, 2018 at 7:29:15 PM UTC+2, Darko Luketic wrote: > > How would I use something like gofmt to format a string in memory? > > I wouldn't want to write a temporary file then os.Exec gofmt and re-read > that file. > There has to be a better

[go-nuts] using gofmt "internally" to format a string, aka in memory go code formatter

2018-03-26 Thread Darko Luketic
How would I use something like gofmt to format a string in memory? I wouldn't want to write a temporary file then os.Exec gofmt and re-read that file. There has to be a better way. Did anyone do anything like that before? -- You received this message because you are subscribed to the Google

[go-nuts] net/http GET request with params

2017-12-11 Thread Darko Luketic
Hello, I'm really puzzled. I tried Set and Add. Request.Url.Query() is empty Do I have to build the uri first before and then passing it to http.NewRequest? func HybridFlow() { response_type := "code id_token" scope := "openid profile email" nonce := uniuri.New() state :=

[go-nuts] Re: Generic service via interfaces...

2017-05-29 Thread Darko Luketic
Humm.. I wrote a reply but it seems it only reached Justin and not this group. Also I have not received other replies via email. Ok... Ayan, no that's alright it was storage.UserModelInterface and I know what you're all saying but I saw no other way to make them type agnostic and I'm a fan of

[go-nuts] Generic service via interfaces...

2017-05-28 Thread Darko Luketic
I'm stuck and I hoped it wouldn't come to that. I wanted to have interfaces for various databases aka "I wanted to support multiple databases" (not debatable). The idea was have ModelInterface (UserModelInterface, CategoryModelInterface etc) which would wrap the model with getters setters

[go-nuts] Streaming EME mp3?

2017-01-03 Thread Darko Luketic
We have a site with many mp3 files. And every now and then someone would have the smart idea to download our files and put them on Youtube for monetization purposes. I'd like to stop that. I read a bit about "Encrypted Media Extensions" aka browser drm. But I'm not sure how that is done on the