[go-nuts] Re: Not getting 1.15.5 as the latest Go version - getgo

2020-11-17 Thread Diego Medina
I entered https://github.com/golang/go/issues/42676 and I sent the related CL On Tuesday, November 17, 2020 at 2:23:45 PM UTC-5 Diego Medina wrote: > great, thanks! Then I'll see about raising an issue/PR with the project > that uses that url. > > > > On Tuesday, November 1

[go-nuts] Re: Not getting 1.15.5 as the latest Go version - getgo

2020-11-17 Thread Diego Medina
great, thanks! Then I'll see about raising an issue/PR with the project that uses that url. On Tuesday, November 17, 2020 at 2:09:19 PM UTC-5 seank...@gmail.com wrote: > VERSION reports the version the site is under, use > https://golang.org/dl/?mode=json instead > > On Tuesday, November 17,

[go-nuts] Not getting 1.15.5 as the latest Go version - getgo

2020-11-17 Thread Diego Medina
Hi, Today I tried the getgo [1] binary but instead of providing Go 1.15.5, it installed 1.15.4. I looked around the code and ended up in https://golang.org/VERSION?m=text which reports 1.15.4 as the latest. Is this the right place to report this to get it fixed? [1]

[go-nuts] Re: [CODE REVIEW] How to improve structure of Service and DAO Layers

2020-10-10 Thread Diego Medina
Hi Karan, >I don't have a background in Java/C#[...] This is actually good, there is less for you to "unlearn" If you don't want to pass parameters to create a user, like passing the userID, name, etc, because it "seems wrong/verbose", then don't worry about it. In Go (any I apply this to

[go-nuts] Re: Help: Encrypting and Decrypting ASCII armor PGP Messages with golang.org/x/crypto/openpgp

2020-10-10 Thread Diego Medina
There is only a small change I had to do to get it to encrypt and decrypt: inside your encryptMessage() func, change: _, err = encryptorWriter.Write([]byte(message)) //messageReader := bytes.NewReader([]byte(message)) //_, err = io.Copy(encoderWriter, messageReader) using the Write() method vs

[go-nuts] Re: Monorepo several binaries and build only some

2020-09-14 Thread Diego Medina
Thanks! On Monday, September 14, 2020 at 5:02:53 PM UTC-4 Alex wrote: > Sorry, return values were reversed. "true\n" if it needs rebuilding > > On Tuesday, 15 September 2020 at 5:00:23 am UTC+8 Alex wrote: > >> You can run the command: *go list -f {{.Stale}}* >> It will print a "true\n" or

[go-nuts] Monorepo several binaries and build only some

2020-09-14 Thread Diego Medina
Hi, Is there a way to know if a binary has to be rebuilt, due to changes to some of its dependencies? Let's say I have a repo with this structure: /cmd/tool1/main.go /cmd/tool2/main.go /pkg/users/update.go /pkg/math/avg.go tool1 imports the math package tool2 imports both, math and user

[go-nuts] Re: pprof samples

2020-04-22 Thread Diego Medina
Hi, This doesn't answer your question but usually when I need to profile our app, I first use expvar to report different internal stats like what the app is doing (how many records is it walking from the db, any batch process, etc), send those to datadog (any monitoring works fine) and then I

[go-nuts] [Job] Remote Junior Go developer - Full time employee (US and parts of Europe)

2019-10-16 Thread Diego Medina
view. To apply you can email your CV in pdf format to diego.med...@cssregtech.com (if the address is hidden by google, use my first name dot last name and the domain is cssregtech.com ) Thanks Diego Medina VP Engineering https://www.ascendantcompliancemanager.com/ -- You received this mes

[go-nuts] Re: redirecting http to https

2019-09-25 Thread Diego Medina
You can run a go routine similar to: go func() { log.Fatal(http.ListenAndServe(":80", http.HandlerFunc(httpToHTTPS))) }() //httpToHTTPS redirects all http to https func httpToHTTPS(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "https://"+r.Host+r.URL.String(),

[go-nuts] Re: Modules - Issues releasing cron/v3

2019-07-16 Thread Diego Medina
As a regular user, I wouldn't expect go get to give me v1 all the time, I would expect to get all kinds of breaking builds all the time because that is the reality of go get. And for those who enter tickets asking why? I would nicely explain that go get is the quick and dirty way to get started

Re: [go-nuts] Simple Go http daemon under systemd

2018-11-23 Thread Diego Medina
> I'm not looking for an service/socket example, if the service part is in reference to the repo I posted, where I said service, you can just assume I said an http endpoint you can visit with your browser, and it will return a status code, like curl -v https://mrwilson.one/status * Trying

[go-nuts] Re: Simple Go http daemon under systemd

2018-11-22 Thread Diego Medina
Check this repository https://github.com/fmpwizard/mrwilson * It runs a very simple https service * Gets certificates using Let's Encrypt * Has ansible playbook to run the app under systemd feel free to ask any questions. Diego On Thursday, November 22, 2018 at 10:14:52 PM UTC-5, Tong Sun

[go-nuts] help with openpgp error: tag byte does not have MSB set

2018-11-22 Thread Diego Medina
Hi, At work we get pgp encrypted files from different vendors, when our app tries to decrypt the file from one of them, I get: openpgp: invalid data: tag byte does not have MSB set But if I use the gpg command line, I'm able to decrypt it. Part of the verbose output from gpg when it decrypts

[go-nuts] Re: Participate in the Go 2018 Company Questionnaire

2018-10-07 Thread Diego Medina
Thanks for gathering this info, and the work you all put into Go, but I just went to answer it and I wonder how many people are going to answer this one wrong: What are the preferred languages at your company? (top 4) (Please list up to 4, 1 = most preferred) scale is 1 to 4, in most surveys,

[go-nuts] Re: printing a struct fields that implements an error interface

2018-02-18 Thread Diego Medina
using %#v as in https://play.golang.org/p/VVqUVsfzx6e log.Printf("Hello, playground %#v\n", ret) On Saturday, February 17, 2018 at 7:05:42 PM UTC-5, Joseph Lorenzini wrote: > > Hi all: > > Per documentation: > > "If an operand implements the error interface, the Error method will be >

[go-nuts] Re: Badger Write Performance

2018-01-21 Thread Diego Medina
The use of SyncWrites=false on badger's benchmark was called out on reddit and the benchmark author's reply was along the lines of "it's ok for our use case to lose the last few [seconds|ms] of data" You draw your conclusion on where you want to keep your data. On Thursday, January 18,

[go-nuts] Re: Learning Go: suggestions for code review?

2017-12-13 Thread Diego Medina
Don't do relative imports (littlelang/tokenizer) or . littlelang/tokenizer . Unless you want to run into corner cases with tools not knowing where code is defined or if you want to confuse other developers. Using the full path makes it very clear where the code is, yes, if you move things

Re: [go-nuts] xml Unmarshal does not see expected type

2017-11-16 Thread Diego Medina
s boxing is exactly the same thing that happens automatically in the > first function call. > > //jb > > > On 16 Nov 2017, at 21:52, Diego Medina <fmpwiz...@gmail.com> wrote: > > Hi, > > At work I have 3 different xml files I need to parse (different fields > ea

[go-nuts] xml Unmarshal does not see expected type

2017-11-16 Thread Diego Medina
Hi, At work I have 3 different xml files I need to parse (different fields each), Because going from the xml bytes into a struct is pretty much the same for all 3 types, I thought I could do something like var payload interface{} if kind == "A" { paylaod = TypeA{} } if kind == "B" {

[go-nuts] Re: Update Mongodb fields with omitempty flag in Golang structure

2017-11-08 Thread Diego Medina
replied on the mgo list https://groups.google.com/d/topic/mgo-users/F3LbWdyPGDc/discussion (pasted here to save a click) Hi, > the checkbox is unchecked and form is submitted to save. Now as I have applied "omitempty" if the checkbox is unchecked, your client side code should send "false"

[go-nuts] Re: Go vendoring question

2017-11-01 Thread Diego Medina
I have been using https://github.com/FiloSottile/gvt for years, it's great, simple, you vendor only what you want, so, in this case, that one lib you are talking about you can even leave the imports as they are, but point to your own fork of the repo by modifying the manifest file for

Re: [go-nuts] Re: time.Parse with millisecond separated by colon

2017-10-30 Thread Diego Medina
47 AM, Jim Cote <jfco...@gmail.com > > wrote: > >> See https://golang.org/src/time/format.go?s=23626:23672#L249. The >> standard library is explicitly looking for the period. Your easiest >> solution would be to just write your own parser. >> >> &g

[go-nuts] time.Parse with millisecond separated by colon

2017-10-30 Thread Diego Medina
Hi, I need to parse datetime data given in a csv file, the format I get (I get a lot of diff ones but the latest is): 20060102 15:04:05:000 but if I use that with time.Parse, it doesn't parse the millisecond part, tells me: parsing time "20170628 12:11:00:103" as "20060102 15:04:05:000":

Re: [go-nuts] Re: Iota with string constants

2017-10-16 Thread Diego Medina
If it is something like weekdays (very few options), I don't see any issues with it. Stringer is great when as you go along using your app, you may need to add more values over time. using iota and stringer is great when your list may be 15 or more items, and keeping them updated becomes a

Re: [go-nuts] Re: Why are two slices in this example less costly than one?

2017-10-13 Thread Diego Medina
> > > This is exactly what I was trying to figure out how I would be able to do, > and more specifically, if there's an easy way to find out. > > the pprof tool can read a memory or cpu profile created during your benchmark, and then you can see details of your function, line by line, and

[go-nuts] Re: Serialized HTTP requests with asynchronous responses

2017-09-26 Thread Diego Medina
Hi, Probably not the answer you were expecting, but : > The nonces must be received by the host in ascending order. is going to fail sooner or later, no matter which trick/feature you use. A more robust solution would be to code the server to accept unordered requests and handle them

Re: [go-nuts] Re: How to run escape analysis on subpackage

2017-09-14 Thread Diego Medina
Bardin <j.bar...@gmail.com> wrote: > > > On Thursday, September 14, 2017 at 10:58:27 AM UTC-4, Diego Medina wrote: >> >> >> go build -gcflags "-m -m" github.com/me/project-name/packagea and >> nothing prints out, >> >> >> >

[go-nuts] How to run escape analysis on subpackage

2017-09-14 Thread Diego Medina
Hi, I have a project with a package main and then a few other packages inside it, something like: $GOPATH//src/github.com/me/project-name $GOPATH//src/github.com/me/project-name/packagea $GOPATH//src/github.com/me/project-name/packageb if I run go build -gcflags "-m -m" at

[go-nuts] Re: Best way to launch/monitor several go process in production

2017-09-04 Thread Diego Medina
This https://github.com/jpillora/overseer may do what you need or at least give you an idea of what you can do. The way oveerseer works is, you start your app, when you send a particular kill signal, it keeps the running app running and it spawns a duplicate, it passes new http requests to the

[go-nuts] Re: golang continuous deployment & gitlab

2017-08-20 Thread Diego Medina
Hi, At work we have all of our deployment logic written in ansible and simply call an ansible playbook from jenkins (gitlab-ci in your case) Here is a sample project using ansible https://github.com/fmpwizard/mrwilson/tree/master/ansible it has all the roles, code, etc needed to start with a

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-08-10 Thread Diego Medina
> So do you mean the way to do it is to hardcode most of functionality. No > need to use custom types, interfaces. Just plain text parsing? > > In that case, how easy is it to evolve or refactor the code? > > Thanks > > On Wednesday, July 26, 2017 at 8:36:15 PM UTC+2, Diego Me

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-26 Thread Diego Medina
I think we have a similar setup to what you are trying to do, we also started with Scala and about 3 years ago we moved it to Go (still use Scala for other parts of our app). While working in Scala and other languages you are encourage to abstract things as much as you can, in Go it is often

[go-nuts] Re: golang on ec2; terraform, salt, etc.

2017-07-25 Thread Diego Medina
Hi, For what you described, I wouldn't even use Docker (not trying to get into flame wars, just my opinion that not using it will keep your setup even simpler) Some time ago I wrote this https://github.com/fmpwizard/mrwilson/tree/master/ansible it's a complete ansible set of playbooks,

[go-nuts] Re: Switching from rsc.io/letsencrypt to x/crypto/acme/autocert

2017-07-05 Thread Diego Medina
yes, you provide the storage implementation and the library will use it when it needs to store/retrieve certs On Wednesday, July 5, 2017 at 10:48:26 AM UTC-4, Daniel Martí wrote: > > Hi all, > > One project I contribute to started using rsc.io/letsencrypt years ago. > Now that it's

[go-nuts] Re: what can I do with this 'workspace' Google have given me?

2017-05-18 Thread Diego Medina
Hi, Having a default "go" folder inside your home directory is a recent change (I believe it was introduced in 1.8) The mac installer may do extra steps, but my guess is that you started using Go before you set GOPATH to the dropbox folder, a simple go get would create the $HOME/go folder

Re: [go-nuts] Re: Building with "go install" vs "go build"

2017-04-18 Thread Diego Medina
> Often, this involves incrementing the version [...] If the process of saying "this binary is good to go, deploy it locally for use" already involve more than go install, maybe you could also "deploy" the binary to a different location than $GOPATH/bin . The benefit there is that you can take

[go-nuts] Re: ast - Missing Ident.Obj

2017-04-17 Thread Diego Medina
lp better if you can uncover, > > - "expected package a but found b for file xyz.go" > - "For now, the information I'm looking for is the Decl value, " > > Must be a simple difficulty to fix. > > On Monday, April 17, 2017 at 8:29:22 PM UTC+2, Diego Medina wrote: &

[go-nuts] Re: ast - Missing Ident.Obj

2017-04-17 Thread Diego Medina
> visualize the tree > I even created a gist, > https://gist.github.com/mh-cbon/3ed5d9c39e9635cfed0f89698133 > to use in place of https://golang.org/pkg/go/ast/#example_Print > > On Monday, April 17, 2017 at 3:45:23 PM UTC+2, Diego Medina wrote: >> >> Hi, >

[go-nuts] ast - Missing Ident.Obj

2017-04-17 Thread Diego Medina
Hi, I'm using go/ast (and token/types. etc) to parse a Go project, it all works well when my program only has one package, but there are times where I have code like this: file-a.go = package a ... selector := b.Selector(CompanyID) ... and then file-b.go package

[go-nuts] Re: Best practice for client API with both context-aware and non-context-aware methods

2017-04-16 Thread Diego Medina
Like others have said, go with #2, and to help those developers who are new to Go, provide easy to find (maybe in the README) examples of what to do when they don't actually have any useful context value to pass. That will save them time searching around to see what context is, what to use it

Re: [go-nuts] Go Path & Github Sync

2017-04-05 Thread Diego Medina
Something that wasn't too clear to me when I started using Go several years ago was "where is the .git folder going to end up as part of the GOPATH path", if this is what you are also wondering, the answer is: go --- bin --- pkg --- src --flmain --flowlogs --github.com

[go-nuts] Re: Is it a concurrency issue?

2017-03-03 Thread Diego Medina
maps are not thread safe, so when you read/write to them, you need to use a mutex, see the "concurrency" sections here https://blog.golang.org/go-maps-in-action That is a good explanation with code samples. Thanks Diego On Friday, March 3, 2017 at 8:31:12 AM UTC-5, 詹青朋 wrote: > > Hey guys,

[go-nuts] Re: File organization in a github-ed Go project

2017-02-28 Thread Diego Medina
Note that if you write a project that other users would use, you will force them to update their $GOPATH to make your app work. Which I think it a lot worse than making people who fork your project update the import path And like someone else said, if I need to fork a project, I most likely

Re: [go-nuts] Re: Golang Messenger Bot frameworks

2017-02-22 Thread Diego Medina
is to be ruled by someone > inferior to yourself." --*Plato* > -- Diego Medina Lift/Scala Consultant di...@fmpwizard.com https://blog.fmpwizard.com/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Are relative import paths idiomatic?

2017-02-22 Thread Diego Medina
Hi, Not recommended, it's better to be explicit by using the full import path, even if it feels odd at first, other users reading your code will know exactly where the packages are. For more info, see the last two replies here

[go-nuts] Re: Golang Messenger Bot frameworks

2017-02-22 Thread Diego Medina
Hi, 1. Would help if you could post a link to the challenge/API 2. iric, Facebook uses https://wit.ai/ for their chat bots, and they have an http API so using regular Go you don't need any sdk/framework Thanks On Wednesday, February 22, 2017 at 8:15:19 AM UTC-5, Nyah Check wrote: > > Hi

[go-nuts] Re: Issue with Goroutine and http.RedirectHandler

2017-02-20 Thread Diego Medina
Most likely this is your browser that "remembers" that going to one url was redirecting to the "incorrect" url, and it doesn't even hit your local server any more. To make sure this is the case, use curl from the command line with the -v paarameter to see all the headers: curl -v

[go-nuts] Re: Re[2]: Golang server background notofication process

2017-02-19 Thread Diego Medina
quot;location") >*go* ctl.startWatchUserLocation(username, location) > } > > And one more quetion: how can I close specific background > process(goroutine with infinite loop) when client want to stop tracking > some location? > For example, clients sends anothe

Re: [go-nuts] Re: Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-19 Thread Diego Medina
cala would be bad for making a standalone >> program that checks gRPC health endpoints because the binary would be large >> and the start-up time would be long. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts&

Re: [go-nuts] Re: Struggling with working directory

2017-02-19 Thread Diego Medina
need for merging in future updates. > > > > Thanks > > Sayth > -- Diego Medina Lift/Scala Consultant di...@fmpwizard.com https://blog.fmpwizard.com/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscrib

Re: [go-nuts] Re: Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-18 Thread Diego Medina
d your team get to use Go on this next project. > On Sat, Feb 18, 2017 at 1:30 PM Diego Medina <fmpw...@gmail.com > > wrote: > >> The reasons we have for moving our Scala heavy process app to Go are: >> >> 1. Much, much smaller memory footprint, both, initial

[go-nuts] Re: Golang server background notofication process

2017-02-18 Thread Diego Medina
Hi, See below: My first idea was to make some background process, which will scrape rooms > every 30 seconds, save the results *(in mongo, in cookies or somewhere > else, advise me please)*, match new scrape results with previous and save > differences (new rooms) in DB for future posting to

Re: [go-nuts] Re: Why Go doesn't see my local package?

2017-02-18 Thread Diego Medina
ay. And it is independent of any package directory structure. > > Go is very diff than many other languages, good practices there don't always translate to Go's good practices, this being one of them. Thanks Diego > Angel "Java" Lopez > @ajlopez > > > On Fri, Fe

[go-nuts] Re: Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-18 Thread Diego Medina
The reasons we have for moving our Scala heavy process app to Go are: 1. Much, much smaller memory footprint, both, initial app running and then loading the same number of items from our database. 2. During development, compilation time. 3. Version upgrades: As long as you vendor your Go

[go-nuts] Re: Why Go doesn't see my local package?

2017-02-17 Thread Diego Medina
Hi, I think you pasted the same content to test.go as well as second.go in any case, if you use go run, you need to specify all the files involved: go run test.go second.go should do the trick That being said, unless you are writing small scripts using Go, I would not recommend doing this,

[go-nuts] Re: question on golang.org/x/crypto/acme/autocert

2017-02-14 Thread Diego Medina
I wrote this https://blog.fmpwizard.com/2016/09/30/automatic-tls-certificates-for-your-go-application/ which downloads the certs to a path you specify there is a complete Go app to show how it all works together Thanks Die On Tuesday, February 14, 2017 at 8:11:51 AM UTC-5, Tieson Molly

Re: [go-nuts] Re: Struggling with working directory

2017-02-13 Thread Diego Medina
g difficult. > > Cheers > > Sayth > > On Mon, 13 Feb 2017, 11:41 PM Diego Medina <di...@fmpwizard.com> wrote: > >> Can you include the link to the guide you followed to install Go? >> >> I always follow >> https://golang.org/doc/install#install &g

Re: [go-nuts] Re: Struggling with working directory

2017-02-13 Thread Diego Medina
never had to set GOBIN Thanks Diego On Mon, Feb 13, 2017 at 5:39 AM, Sayth Renshaw <flebber.c...@gmail.com> wrote: > > > On Sunday, 12 February 2017 04:16:15 UTC+11, Diego Medina wrote: >> >> Hi, >> >> you were very close, instead of >> >> go in

[go-nuts] Re: Struggling with working directory

2017-02-11 Thread Diego Medina
Hi, you were very close, instead of go install github.com/mortalcatalyst/xml/xml.go do go install github.com/mortalcatalyst/xml In go, you don't install the particular file, you install the program as a whole (which in many cases, it involves more than one file) And as a side note,

[go-nuts] Re: Should golang.org/x/crypto/ssh.ParsePrivateKey() be extended to parse encrypted keys?

2017-02-01 Thread Diego Medina
In case anyone else gets to this post but has an ssh-agent running, you can use this: import ( "net" "os" "golang.org/x/crypto/ssh/agent" ) if aconn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil { signerFn := agent.NewClient(aconn).Signers signers, err := signerFn()

[go-nuts] Re: Program design question

2017-01-19 Thread Diego Medina
If you were planning on running each binary on different servers, then it would somewhat make sense (but you should really measure to see how CPU heavy the processing is). But if you are planning on putting both binaries on the same server, you may as well just have one binary. Otherwise both

[go-nuts] Re: Using Go in a locked down SOC2 environment (dependency management hell)

2017-01-06 Thread Diego Medina
> All of our build servers are locked down and cannot reach public Internet, only our local library mirror. With this in mind, you could use gvt https://github.com/FiloSottile/gvt all your devs should use it to fetch dependencies, yes, they would use open internet, but only while they get

[go-nuts] Re: How has your company adopted Go ?

2016-12-19 Thread Diego Medina
In our case, our original product was a web app, written in Scala, as our data starting growing, we had to move from real time queries to our database plus some data manipulation to precalculating/storing the data in a ready to server manner. This worked well for a while, but eventually our

[go-nuts] Upgraded to Go 1.8beta2 and now Atom go-plus isn't working

2016-12-16 Thread Diego Medina
Hi, I have seen similar posts to this but I could not find any of them so posting this. I went ahead and installed the latest beta to try it out, both my apps at work work ok with it (yeah!), but now go-plus in Atom (and the autocomplete plugin) won't autocomplete any more, it just offers

[go-nuts] Re: Supervisor Golang app

2016-11-29 Thread Diego Medina
Hi, it isn't finding the actual binary of your go app. The binary could be in one of two places, if you run go install it goes to $GOPATH/bin which is /root/work/bin if you did go build, it is at the root of your project directory Hope that helps. On Tuesday, November 29, 2016 at

Re: [go-nuts] Is this go gettable ? crypto/tls/generate_cert.go

2016-11-03 Thread Diego Medina
> > > Back on my original question, its ok if i copy paste the code into a > specific module with its appropriate credits ? > Given the quick red i gave it, there s really not much to change to this > code, it if works already. > > at the top of that file it says : // Use of this source code

[go-nuts] Re: folder and package structure with ddd based micro services

2016-10-31 Thread Diego Medina
Hi, > How can i run my tests "go test" for my entire domain model is they are > in sub folders? > If I understood your question, what you are looking for is to run go test ./... at the root, that will run tests at the root but also tests in the subfolders Regards, Diego > >

[go-nuts] Re: Stopping a server

2016-10-27 Thread Diego Medina
As a user of a package, if I "start it" by calling Start(), I will most likely look for a "Stop()" function but calling cancel on the context wouldn't feel natural because I'm not canceling the server, I would be done with it and don't need it any more). Regards, On Thursday, October 27,

Re: [go-nuts] mgo , slice , reset var, need help understanding why this works

2016-10-24 Thread Diego Medina
hat. Remember that bson.M is just interface{} and maps are pointer- > like. > > On Mon, 2016-10-24 at 11:56 -0700, Diego Medina wrote: > > Hi (sorry for the cryptic subject, I'm just not sure what to even > > call > > this): > > > > > > I think th

[go-nuts] mgo , slice , reset var, need help understanding why this works

2016-10-24 Thread Diego Medina
Hi (sorry for the cryptic subject, I'm just not sure what to even call this): I think this is not strictly a mgo question, I have this simplified function that gets documents from a mongo instance using Iter(), I then loop through the results, append them to a slice []interface{} but the

Re: [go-nuts] time.Parse : hour out of range

2016-10-19 Thread Diego Medina
Thanks for the answers, looks like I'll keep using my work around for the time being. Diego On Wednesday, October 19, 2016 at 1:19:08 PM UTC-4, Kyle Shannon wrote: > > Related to: > > https://github.com/golang/go/issues/12919 > > On Tue, Oct 18, 2016 at 9:49 PM,

[go-nuts] time.Parse : hour out of range

2016-10-18 Thread Diego Medina
Hi, >From a 3rd party I get a file with time like 1503 or 900 (meaning 3:03PM or 9:00 AM) so I thought I could use this format: https://play.golang.org/p/RKR71hTWGo x, err := time.Parse("1504", "900") but the result is: 2009/11/10 23:00:00 parsing time "900": hour out of range As a work

[go-nuts] Re: SimpleHttpServer built into go toolchain?

2016-09-29 Thread Diego Medina
Hi, If you don't want to have to copy/paste that snippet of code on a new laptop/OS install, I have been using: $ go get github.com/rif/spark $ spark static_site/ for the last couple of years, works great, it's simple. https://github.com/rif/spark Regards, Diego On Thursday, September 29,

[go-nuts] Re: Trying to understand GOPATH

2016-09-23 Thread Diego Medina
As you start working with Go, one other thing you may want to add to your ~/.bash_profile (on linux and mac, not sure about others) is CDPATH=.:$GOPATH/src/code.google.com/p:$GOPATH/src/github.com:$GOPATH/src/bitbucket.org export CDPATH so let's say you have $GOPATH as

Re: [go-nuts] Go beginner asks for code review

2016-09-22 Thread Diego Medina
Hi, First, awesome that you started using Go! some thoughts inline: > 1. The sbxs_ prefix is there just because I expect this package to be part > of a set of related repositories and I wanted to give them some "unity" > through naming. Arguably a bad idea, I am not sure about it. > I have

[go-nuts] Re: create a .rpm file for go app.

2016-09-21 Thread Diego Medina
You could also use https://equinox.io/ once you have your token. keys, etc all setup, you can build new releases rpm, deb, etc using equinox release \ --version="1.0.0" \ --platforms="darwin_amd64 linux_amd64" \ --signing-key=/Users/inconshreveable/equinox.key \ --app="app_ja6WuaZgwsF" \