RE: [go-nuts] Test a Golang API on the web

2019-05-29 Thread Michael Banzon
You could look at Heroku. It should be pretty easy to get started with.

You could also find a coupon code for Digital Ocean and fire up a server on 
your own.

/ M


From: golang-nuts@googlegroups.com  on behalf of 
aimar 
Sent: Monday, May 27, 2019 9:28:21 AM
To: golang-nuts
Subject: [go-nuts] Test a Golang API on the web

Hi,

My teacher has asked me to develop an API with Golang and test it on the web 
instead of localhost. I was thinking of github.io but then I figured out, it 
doesn't support server-side languages and just support static pages. Would you 
please let me know, if there is any platform which I can test my API online 
rather than localhost? (for free, of course)
It is worth to mention my API generally generates just a couple of strings from 
a JSON file, thus it does not need a database.

thanks,
Aimar

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5202a914-c3bc-48d4-bdb0-e613a83ea24d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/MN2PR03MB4797FD6DD3C23C88F6CB2F8EB31F0%40MN2PR03MB4797.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Gomobile

2017-06-13 Thread Michael Banzon
Yes.

On Tue, Jun 13, 2017 at 4:51 PM Clayton Ray  wrote:

> Is https://github.com/golang/mobile";>Golang/mobile not
> actively being developed anymore? I see the last commit was 20 days ago,
> but before that, months.
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Gomobile

2017-06-13 Thread Michael Banzon
Sorry, it is 😀
tir. 13. jun. 2017 kl. 17.17 skrev Clayton Ray :

> Yes it is or yes it's not?
>
>
> On Tuesday, June 13, 2017 at 11:10:43 AM UTC-4, mbanzon wrote:
>
>> Yes.
>>
>> On Tue, Jun 13, 2017 at 4:51 PM Clayton Ray  wrote:
>>
> Is https://github.com/golang/mobile";>Golang/mobile not
>>> actively being developed anymore? I see the last commit was 20 days ago,
>>> but before that, months.
>>>
>>> --
>>> 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...@googlegroups.com.
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> Michael Banzon
>> https://michaelbanzon.com/
>>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go 1.9 Beta 1 is released

2017-06-15 Thread Michael Banzon

does this mean that 2.0 is next?


On Thu, Jun 15, 2017 at 5:45 PM Brad Fitzpatrick 
wrote:

> On Wed, Jun 14, 2017 at 11:35 PM, Sokolov Yura 
> wrote:
>
>> So, no scalable timers in 1.9 ?
>> https://go-review.googlesource.com/c/34784/15
>> It's a pity.
>
>
> Yes. But Aliaksandr hasn't replied to Dmitry for the past 10 days, either.
>
> We don't ship code that hasn't made it through code review.
>
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: An idea about motivating the community

2017-07-18 Thread Michael Banzon

I'd like a tool for measuring Go community involvement.

I'm thinking that this can be done automagically - by adding feeds (twitter, 
blog, repos, this list etc) to a crawler and giving scores based on activity - 
compared with a way to link accounts/contributors (mich...@banzon.dk == 
@mbanzon e.g.) - that could be a nice "passive" way to make community 
leaderboard (or maybe just a score lookup).

--
Michael Banzon
https://michaelbanzon.com/

Den 18. jul. 2017 kl. 09.02 skrev ondrej.li...@gmail.com:

That's quite a lot of work! 
I personally hate gamification but agree that it can motivate some people to 
participate. At the same time I would consider using financial incentives - 
bounties and the likes. Or probably a mixture of gamification, bounties, 
commendations and other forms of appreciation.

I'd like to help to give back to the community so if this is a go then I'm in!

Ondrej

Dne úterý 18. července 2017 3:52:04 UTC+2 Nate Finch napsal(a):
> 
> (sorry for the duplicate post, the other one disappeared)
> 
> I wrote a tweet after Gophercon about making a resolution to write more blog 
> posts.  I used the hashtag #GopherResolution with the hope that other people 
> might pick up the idea and run with it.  So far, however, only one other 
> person has used the tag.  
> 
> There are studies on the effects of making public promises (resolutions) to 
> act that indicate it is generally effective in getting you to stick to those 
> resolutions (at least more so than ones you don't announce).
> 
> However, it occurred to me that most resolutions fail because they're too 
> vague.  There's an acronym called SMART that says your goals should be 
> Specific, Measurable, Achievable, Realistic, and Time-based.  The 
> "measurable" one is the interesting one, and where I think we can leverage 
> software to help us.  
> 
> My idea is to make a website where gophers can make specific resolutions to 
> contribute to the community, and the website can then track those resolutions 
> over time.  For example, a resolution to write blog posts could be tracked by 
> consuming an RSS Feed.  A resolution to contribute to a particular project 
> could track PRs, issues, etc.  The website could track streaks over time if 
> we give a time box for each contribution (write a blog post every 2 weeks, or 
> contribute to one open source project every month).
> 
> With dashboards showing top contributors, etc, it could effectively game-ify 
> community involvement.
> 
> Of course, all of this would take a significant amount of work to code, but 
> it seems very doable, if enough people would actually participate.
> 
> Thoughts?  Is this something you'd be interested in?  Do you think it would 
> be valuable to build?
> 
> -Nate

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Anyone using https://github.com/knq/xo?

2017-07-19 Thread Michael Banzon
Just out of curiosity - why switch away from gorm??

We've just switched from gorp to gorm - with great success. The main reason I 
could find for going (pun intended) is to have one less dependency.

--
Michael Banzon
https://michaelbanzon.com/

Den 20. jul. 2017 kl. 06.04 skrev Nate Finch :

We're thinking of dropping gorm and switching to plain old database/sql... but 
I don't really want to generate all that boilerplate myself.  xo looks like it 
does a reasonable job of generating the boilerplate for you, so I was wondering 
if anyone had any experience using it in production.  Gotchas, etc.

-Nate
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Anyone using https://github.com/knq/xo?

2017-07-20 Thread Michael Banzon
I see your point.

I might checkout going bare database/sql on one of my smaller projects to get a 
feel for it - now that I’ve been thinking about it it strikes me that I’ve 
actually never tried database stuff on Go without gorp/gorm etc.

-- 
Michael Banzon
https://michaelbanzon.com/




> Den 20. jul. 2017 kl. 19.22 skrev Nate Finch :
> 
> The main reason is to avoid magic.  My past experience with ORMs has been 
> that they make easy things easier and hard things harder.  Once you start 
> leveraging relational bits, they become incredibly unwieldy to actually use.  
> They also tend to generate wildly suboptimal SQL and rely on a lot of 
> reflection that is just slow.
> 
> On Thursday, July 20, 2017 at 2:56:21 AM UTC-4, mbanzon wrote:
> Just out of curiosity - why switch away from gorm??
> 
> We've just switched from gorp to gorm - with great success. The main reason I 
> could find for going (pun intended) is to have one less dependency.
> 
> --
> Michael Banzon
> https://michaelbanzon.com/ <https://michaelbanzon.com/>
> 
> Den 20. jul. 2017 kl. 06.04 skrev Nate Finch  >:
> 
> We're thinking of dropping gorm and switching to plain old database/sql... 
> but I don't really want to generate all that boilerplate myself.  xo looks 
> like it does a reasonable job of generating the boilerplate for you, so I was 
> wondering if anyone had any experience using it in production.  Gotchas, etc.
> 
> -Nate
> 
> -- 
> 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...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Check for minimum Go version

2017-08-09 Thread Michael Banzon
Hi,

Is there a way to have a (bash) script check if the version of the Go compiler 
installed is a specific minimum version?

-- 
Michael Banzon
https://michaelbanzon.com/




-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Check for minimum Go version

2017-08-10 Thread Michael Banzon
Thanks for the responses.

I will try a few options and see what fit best.

For a bit of context I’m making a script to check if the entire toolchain 
needed to build a project is present on the machine. The script checks for 
node/npm, Go, GCC and a few other tools (like go-bindata eg.). The real 
challenge (atm) is minimum required versions and that this must run on Windows, 
Linux and macOS. A pragmatic solution would be to cut this effort short and 
have the team accept “if build fails, check that this list of tools is 
installed” (it is a <10 ppl team). Another option I’m toying is having the 
(up-to-date) toolchain in a container.

-- 
Michael Banzon
https://michaelbanzon.com/




> Den 10. aug. 2017 kl. 09.14 skrev Konstantin Khomoutov :
> 
> On Wed, Aug 09, 2017 at 03:11:48PM +0200, Michael Banzon wrote:
> 
>> Is there a way to have a (bash) script check if the version of the Go
>> compiler installed is a specific minimum version?
> 
> In the light of [1], I think you could combine checking of the presense
> of the `go` tool itself with build tags.
> Say, something like this (untested):
> 
> >8
>  set -eu
> 
>  rc=0
>  go version >/dev/null || rc=$?
>  if [ $rc -ne 0 ]; then
>echo "The 'go' tool is not available" >&2
>exit 2
>  fi
> 
>  d=`mktemp -d`
>  f=`mktemp`
>  trap "rm -rf '$d' '$f'" EXIT INT TERM QUIT
>  cd "$d"
> 
>  cat >false.go <<'EOF'
>  // +build !go1.7
>  package main
> 
>  import "os"
> 
>  func main() {
>os.Exit(1)
>  }
>  EOF
> 
>  cat >true.go <<'EOF'
>  // +build go1.7
>  package main
> 
>  import "os"
> 
>  func main() {
>os.Exit(0)
>  }
>  EOF
> 
>  go build -o "$f" "$d/*.go"
> 
>  rc=0
>  "$f" || rc=1
> 
>  if [ $rc -ne 0 ]; then
>echo "Insufficient Go version" >&2
>exit 2
>  fi
> 
>  exit 0
> >8
> 
> One possible caveat is that `mktemp` by default creates its filesystem
> entries under $TMPDIR or /tmp, and that directory might be mounted with
> "noexec" on certain systems.  So if your setup script (or whatever it
> is) has a luxury of using its own scratch space, you should probably do
> that (like creating a temp. directory using `mktemp -f ~/.cache/XX`
> or something like this).
> 
> 1. https://github.com/golang/go/issues/21207
> 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SV: [go-nuts] Unmarshal Json

2017-09-26 Thread Michael Banzon
Can it be parsed to a map[string]json.RawMessage (or a more specific type, if 
the value is a known type)?

-- 
Michael Banzon
https://michaelbanzon.com/

Fra: Rich
Sendt: 26. september 2017 20:23
Til: golang-nuts
Emne: [go-nuts] Unmarshal Json

I have a json I have to parse, and in that json one of the keys changes 
depending on the data being generated.  For example:

{
  "Servers": {
    "IPAddress=10.1.1.123": {
      "name": "DNS Server1",
      "type": "Apache Webserver"
    },
    "IPAddress=10.1.1.124": {
      "name": "DNS Server",
      "type": "Bind DNS"
    },
    "IPAddress=10.2.3.43": {
      "name": "Tomcat Server",
      "type": "Java App Server"
    }
  }
}

I have no idea what IPAddress is going to equal, so I'm having a hard time 
writing a struct for it.  Any idea how I can parse this JSON?

Thanks!
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Go predicts the end of the universe

2017-11-11 Thread Michael Banzon
Remember to flush your buffers!

--
Michael Banzon
https://michaelbanzon.com/

> Den 11. nov. 2017 kl. 09.32 skrev andrey mirtchovski :
> 

> Seems time is on our side.

yes it is.
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Help me MVC golang

2017-11-23 Thread Michael Banzon
Please describe the error you are getting. (I suspect this me yet-another “go 
run”-episode)

It seems you are trying to do MVC the ASP.NET <http://asp.net/> way in Go - I’m 
quite confident that this will not give a good result.

I’ve been down a similar route (pun intended) when I started programming Go and 
found that going with the least amount of code was the right way. I recommend 
you try using the default HTTP routing from the std lib.

-- 
Michael Banzon
https://michaelbanzon.com/




> Den 23. nov. 2017 kl. 05.37 skrev Teo :
> 
> -- Blog
> -|---Controllers
> ---|---Backend
> ---|index_controller.go
> ---|---Frontend
> ---|index_controller.go
> 
> -|-main.go
> 
> 
> /// file main.go 
> 
> package main
> 
> import (
> "net/http"
> 
> "./controllers/backend"
> "./controllers/frontend"
> "github.com/julienschmidt/httprouter"
> )
> 
> func main() {
> frontend := &frontend.IndexFrontend{}
> backend := &backend.IndexBackend{}
> router := httprouter.New()
> 
> router.GET("/", frontend.Index)
> 
> router.GET("/admin", backend.Index)
> 
> http.ListenAndServe("localhost:8080", router)
> }
> 
> // frontend / index_controller.go
> 
> package frontend
> 
> import (
> "fmt"
> "net/http"
> )
> 
> type IndexFrontend struct {
> }
> 
> func (c *IndexFrontend) Index(w http.ResponseWriter, r *http.Request) {
> fmt.Println("frontend")
> }
> 
> // backend / index_controller.go
> 
> package backend
> 
> import (
> "fmt"
> "net/http"
> )
> 
> type Indexbackend struct {
> }
> 
> func (c *Indexbackend) Index(w http.ResponseWriter, r *http.Request) {
> fmt.Println("backend")
> }
> 
> 
> go run main.go ==> error 
> 
> Help me code golang? thanks all
> 
> 
> 
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] are interface calls to empty methods optimized away - so there is no function call overhead beyond the dereference/jump?

2017-12-01 Thread Michael Banzon
I don’t have specific knowledge about how this works - but wouldn’t it be 
fairly easy to test by having the compiler emit the assembly code?

-- 
Michael Banzon
https://michaelbanzon.com/




> Den 1. dec. 2017 kl. 19.42 skrev Ugorji Nwoke :
> 
> Thanks Ian.
> 
> This is not so much about de-virtualization. It's about not making a call to 
> an empty function i.e. I expect that interface calls come down to 
> 1. dereference the pointer to the i-tab, 
> 2. jump to the appropriate function in the i-tab, 
> 3. call that function. 
> 
> If that function is a no-op, is the runtime smart enough to skip that 
> function call completely (e.g. replacing the entry in the i-tab with a NOP)? 
> That way, making an interface call to an empty function becomes just a 
> dereference+jump, and not dereference+jump+(unnecessary)func-call ? 
> 
> Currently, in my code, within a tight loop, i have a lot of:
> for {
> if v.HasSeparators() { v.ReadMapElem() }
> ...
> if v.HasSeparators() { v.ReadMapEnd() }
> ... 
> }
> 
> If the func call is elided, then I will just call the empty function all the 
> time and remove the if/conditional checks. The code will become:
> for {
> v.ReadMapElem()
> ...
> v.ReadMapEnd() 
> ...
> }
> 
> 
> On Friday, December 1, 2017 at 10:18:38 AM UTC-5, Ian Lance Taylor wrote:
> On Fri, Dec 1, 2017 at 2:40 AM, Ugorji Nwoke > wrote: 
> > 
> > I know that a no-op function call is optimized away, as it is inlined to 
> > nothing. 
> > 
> > However, what about a no-op interface call? 
> > 
> > See sample code: 
> > 
> > type I interface { Do(int) } 
> > type T1 struct{} 
> > func (_ T1) Do(i int) {} 
> > func main() { 
> > var v I 
> > v = T1{} 
> > v.Do(1) 
> > } 
> > 
> > Is it safe to assume the following that calling T1.Do(...) via an interface 
> > costs a dereference + jump (but NO function call overhead)? 
> > 
> > I currently have code where I do a lot of conditional checks to determine 
> > whether to make that interface call or not. 
> > However, if I know that the no function call overhead is done when the 
> > dynamic function is a no-op, then I will just call the interface 
> > method all the time, and not try to be smart within code. 
> > 
> > I tried looking at "go tool compile -S main.go" output, but I still see a 
> > CALL in there, but don't know whether the linker/compiler/something 
> > optimizes this out. 
> 
> In general, no.  The compiler doesn't currently try to figure out the 
> dynamic type of an interface (an optimization known as 
> devirtualization).  An interface method can only be inlined when the 
> dynamic type is known. 
> 
> The cost of calling an empty method is quite low.  It's not zero, but 
> I am skeptical that the cost of the call is more than the cost of the 
> conditional checks you mention. 
> 
> Ian 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] checking for connection error?

2016-08-03 Thread Michael Banzon
Hi Victor,

There are no "constant" errors in the sql package if thats what you are
looking for.

Generally if .Ping() returns an error there is no connection - afaik the
error string might give some indication but it is totally up to the
driver/database.

If you want to sleep and try again later you can do it this way - but the
reason why .Ping() didn't succeed is unknown.

On Wed, Aug 3, 2016 at 4:34 PM Victor L  wrote:

> Any idea how to check for connection error in database/sql?
>
> err := db.Ping()
> if err == CONNECTION_REFUSED (?) {
> time.Sleep
> }
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go 1.7 is released

2016-08-17 Thread Michael Banzon
"No test, no trust"?

On Wed, Aug 17, 2016 at 1:17 AM Brad Fitzpatrick 
wrote:

> We a phrase as catchy as "Pics or it didn't happen" for this. "Test or
> it's not trustworthy"? Needs work.
>
>
> On Tue, Aug 16, 2016 at 2:16 PM, Dave Cheney  wrote:
>
>> Until it's part of the ./all.bash test suite, it'll continue to break
>> because it has never been proven to work.
>>
>> > On 17 Aug 2016, at 05:13, Michael Hudson-Doyle <
>> michael.hud...@canonical.com> wrote:
>> >
>> >> On 17 August 2016 at 08:31, Dave Cheney  wrote:
>> >> Stripping go binaries is not tested and known to produce broken
>> binaries.
>> >
>> > Stripping should be fine, and any problems produced by it should be
>> > reported as bugs. Please.
>> >
>> >> I recommend not doing this until strip/upx/whatever are tested as part
>> of the unit tests which are run before each commit lands.
>> >
>> > upx, on the other hand, I have no idea about.
>> >
>> > Cheers,
>> > mwh
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Call for Feedback: Scoping gorilla/sessions v2

2017-01-29 Thread Michael Banzon
How do you want the feedback?

To sum up me feelings: lgtm

;-)

On Sat, Jan 28, 2017 at 4:05 AM Matt Silverlock  wrote:

> gorilla/sessions has been around for a while, and with request.Context()
> back in Go 1.7, there's an unavoidable need to make breaking changes to the
> library. While we're at it, breaking a bunch more (and simplifying others!)
> in the process makes a whole lot of sense. We've also been ultra-careful
> about any breaking changes because sessions existed well before many of the
> vendoring tools did.
>
> I've pulled together a list of ideas, but wanted to gather feedback from
> as many (current & future) users as possible. GitHub Issue here:
>  http:///github.com/gorilla/sessions/issues/105
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Wrestling with Mingw64 on Windows

2017-01-30 Thread Michael Banzon
The name of the MINGW suggest that it is 32-bit - are you sure you are
running a full 64-bit tool chain?

What does the --version of the gcc output?

On Mon, Jan 30, 2017, 17:30 Arie van Wingerden  wrote:

>
> 2017-01-30 12:04 GMT+01:00 Arie van Wingerden :
>
>  set PATH=%GOROOT%\%MINGWPATH%\bin;%PATH%
>
>
> typo: ​should be:
>set PATH=%GOROOT%\bin;%MINGWPATH%;%PATH%​
> behavior further as described
>
>
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] How can I distribute incoming HTTP request to 5 asynchronous workers?

2017-01-31 Thread Michael Banzon
Does the processing result get returned to the client?

Does the workers rely on the content of the request body?

On Tue, Jan 31, 2017 at 10:38 PM oso  wrote:

> Hello, I have 5 workers to process asynchronous HTTP requests to the
> system. They all process the same HTTP request in different ways. Workers
> who finish their job are starting to process the HTTP request. How can I
> implement this system?
>
> Regards,
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] How can I distribute incoming HTTP request to 5 asynchronous workers?

2017-01-31 Thread Michael Banzon
Read the content - wrap it up and start the five goroutines and pass it to
them?

On Tue, Jan 31, 2017 at 10:42 PM Onur Özer  wrote:

> No, results not sent back and yes workers rely on the content.
>
> On Wed, 1 Feb 2017 at 00:41, Michael Banzon  wrote:
>
> Does the processing result get returned to the client?
>
> Does the workers rely on the content of the request body?
>
> On Tue, Jan 31, 2017 at 10:38 PM oso  wrote:
>
> Hello, I have 5 workers to process asynchronous HTTP requests to the
> system. They all process the same HTTP request in different ways. Workers
> who finish their job are starting to process the HTTP request. How can I
> implement this system?
>
> Regards,
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Michael Banzon
> https://michaelbanzon.com/
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Reading http.Request form values

2017-03-03 Thread Michael Banzon
Have you checked what the request body contains?

I suspect this is a browser issue.
fre. 3. mar. 2017 kl. 19.36 skrev :

> Initially I intended to file this as an issue on the official Github
> repository for Go but were referred to this page. This is the first time I
> am posting.
>
> I am writing a web server using Go and trying to parse form data from
> client. The form is sent using the POST method and I am trying to get the
> value on the server using the following code:
>
> entry.Title = r.FormValue("title")
>
> which works just fine when the input field on the client uses this code:
>
> 
>
> i.e. when using the name attribute. According to W3, however, the use of
> the name attribute is deprecated (
> https://www.w3.org/TR/html401/interact/forms.html#adef-name-FORM) and
> should be replaced with an id attribute.  When I do this however, FormValue
> fails to recognize the "title" value anymore. I think this would be a bug
> perhaps or maybe there are some other way of getting form values by id that
> I have missed.
>
> Regards
> Linus
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Building Cross Platform GUI apps in Go and Electron

2017-03-08 Thread Michael Banzon
I have no deep knowledge of this - but is also looking into a project with
similar characteristics.

I'm wondering what specifically isn't working for you?

On Wed, Mar 8, 2017 at 1:33 PM Nyah Check  wrote:

> Hi Gophers,
>
> I have this project to build an SSH client for Windows, Linux and Mac OS.
> I have built the back end in Go and intend to build the front end in
> electron. I'm currently stuck getting the GUI to work. The back end of the
> app works well on the Linux browser. I just wish to know if there are any
> Go packages that facilitate the building of cross platform Desktop apps
> with Go and electron.  I've found Gallium
> <https://github.com/alexflint/gallium> and Murlok
> <https://github.com/murlokswarm/app>; but they all seem to support only
> Mac OS only.
>
> Any ideas?
>
> Thanks,
> Nyah
> --
> "The heaviest penalty for declining to rule is to be ruled by someone
> inferior to yourself." --*Plato*
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Date parsing problem

2017-03-14 Thread Michael Banzon
Hey gophers!

I'm having some trouble parsing a few dates and I'm thinking I might be
missing something obvious.

The error I'm getting is:
parsing time "06/11/2014" as "02/01/2006": cannot parse "06/11/2014" as "02"

The code doing the parsing is deeply inside a much bigger codebase. Running
the same parsing on the playground gives me no error:
https://play.golang.org/p/DYaTwaITIo
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Date parsing problem

2017-03-14 Thread Michael Banzon
Thank you - that sent me in the right direction!

The data (read from CSV) has a lot of zero bytes - it is UTF-16 LE with BOM
(shrugs) - now I just need to find out how to parse these with into "real"
Go strings ;-)

On Tue, Mar 14, 2017 at 1:26 PM  wrote:

> May be non-printable garbage at the beginning of "06/11/2014"? When the
> error occurs, dump the problematic date as a []byte slice and see what it
> spits out.
>
>
> On Tuesday, March 14, 2017 at 1:13:57 PM UTC+1, mbanzon wrote:
>
> Hey gophers!
>
> I'm having some trouble parsing a few dates and I'm thinking I might be
> missing something obvious.
>
> The error I'm getting is:
> parsing time "06/11/2014" as "02/01/2006": cannot parse "06/11/2014" as
> "02"
>
> The code doing the parsing is deeply inside a much bigger codebase.
> Running the same parsing on the playground gives me no error:
> https://play.golang.org/p/DYaTwaITIo
> --
> Michael Banzon
> https://michaelbanzon.com/
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Date parsing problem

2017-03-14 Thread Michael Banzon
Thank you - was looking in that direction atm - this is going to take some
work (the CSV is user input, it might be anything) ;-)

On Tue, Mar 14, 2017 at 2:13 PM Tamás Gulácsi  wrote:

> unicode/utf16 or golang.org/x/text/encoding.
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Vendoring nested dependencies

2017-04-13 Thread Michael Banzon
In short: You can't.

Flattening is the way to go (pun intended) but dependeing on different
versions will brake your build.

On Thu, Apr 13, 2017 at 9:48 PM johnbernardo via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> Our team has run into some complicated issues regarding vendoring. The
> simplest way to explain it is with an illustration.
>
> We have three separate repositories; Main, Foo and Bar.
>
> Main vendors Bar
> Main vendors Foo
> Foo vendors Bar
>
> When trying to build this code, compile errors like this arise:
>
> ./main.go:12: cannot use Bar.Method() (type *"Main/vendor/Foo/vendor/Bar".T) 
> as type *"Main/vendor/Bar".T in assignment
>
>
> Flattening the vendor folder structure so that all vendored dependencies
> (nested or not) all resolve in the same place will solve this, but if there
> are actually different versions of Foo (Main depends on Bar@v1, Foo
> depends on Bar@v2) then this becomes problematic once again.
>
> We use govendor as our dependency management tool.
>
> How can we deal with this issue properly?
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] sql/driver: why the Result.LastInsertId method doesn't follow the Go's style for Initialisms?

2017-04-20 Thread Michael Banzon
I don't (really) know.

One reason could be that the "Id" is not an acronym whereas URL is.

Another reason could be that this is how it was written for go1 and now it
can't be changed due to compatibility.
tor. 20. apr. 2017 kl. 15.50 skrev :

> While working with the driver package, I had to implement the Result
> interface. my first instinct was to write the LastInsertId method as
> "LastInsertID", but then the build failed and I figured out what was the
> problem.
>
> What's the reason that the Result interface doesn't follow the Go's style
> for Initialisms
> <https://github.com/golang/go/wiki/CodeReviewComments#initialisms>? (I'm
> not complaining, I'm just curious...)
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] sql/driver: why the Result.LastInsertId method doesn't follow the Go's style for Initialisms?

2017-04-20 Thread Michael Banzon
I realize now (about a minute to late) that the "ID" case is mentioned
specifically in the link you gave - option two it is ;-)
tor. 20. apr. 2017 kl. 17.50 skrev Michael Banzon :

> I don't (really) know.
>
> One reason could be that the "Id" is not an acronym whereas URL is.
>
> Another reason could be that this is how it was written for go1 and now it
> can't be changed due to compatibility.
> tor. 20. apr. 2017 kl. 15.50 skrev :
>
>> While working with the driver package, I had to implement the Result
>> interface. my first instinct was to write the LastInsertId method as
>> "LastInsertID", but then the build failed and I figured out what was the
>> problem.
>>
>> What's the reason that the Result interface doesn't follow the Go's style
>> for Initialisms
>> <https://github.com/golang/go/wiki/CodeReviewComments#initialisms>? (I'm
>> not complaining, I'm just curious...)
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Michael Banzon
> https://michaelbanzon.com/
>
-- 
Michael Banzon
https://michaelbanzon.com/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SV: [go-nuts] 1: json: cannot unmarshal array into Go value of typemain.Catcher or 2: json: cannot unmarshal object into Go value of typemain.Crypto4

2018-05-01 Thread Michael Banzon
You are declaring your struct as []struct and then using it as ”var collect 
[]Crypto4” effectively doubling the arraynes 😉

See this: https://play.golang.org/p/Q3RzNddeVVT

And on a side note: Please check your errors – especially if Things doesn’t 
work – a few err != nil along with fmt.Println’s will save the day 😊

-- 
Michael Banzon
https://michaelbanzon.com/

Fra: m_@li
Sendt: 1. maj 2018 16:05
Til: golang-nuts
Emne: [go-nuts] 1: json: cannot unmarshal array into Go value of 
typemain.Catcher or 2: json: cannot unmarshal object into Go value of 
typemain.Crypto4

Hi !
 I was searching relevant posts  regarding error "json: cannot unmarshal array 
into Go value of type main.Catcher" or "json: cannot unmarshal object into Go 
value of type main.Crypto4". These two error messages are linked to the same 
program (depends on when I change structure). Actually I have to write/display 
data on HTML file which will linked through local host port 8080. I could not 
understand where is the problem I have shared my code and link is attached here.
https://play.golang.org/p/DLOdEGS7hmG (I have quoted main problem with my code 
instead of write down all the code, means another function where I presented 
json data through api and it works good, but presentation of data on html file 
is the problem.
I have created slice like var collect []Crypto4 inside the function and 
unmarshall data through this variable, but still getting error and html file is 
not displaying data, instead of getting error which I wrote above in title. It 
would be so nice to guide me and point out the problem with possible solutions, 
thanks.
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] proposal: embed static assets

2018-05-02 Thread Michael Banzon
I’m guessing that everyone who has a workflow where they currently embed 
resources in their binary will have specific wishes to how it’ll function.

The “easy” way to make serious proposals is to provide an experiment where you 
demonstrate the change you are proposing with an implementation - this will 
naturally require some work.

My/our use of embedded resources include other programs but especially 
frontends (html, css, javascript and images, fonts etc.) for web servers - the 
current solution give us a crucial feature: The files are not embedded during 
development/debugging where they change continually.

There is no doubt that I’d welcome this feature in the standard Go toolchain - 
where it is implemented or how the resource is embedded is not really something 
I have a strong opinion about - but debugging capabilities is ;-)

-- 
Michael Banzon
https://michaelbanzon.com/




> Den 2. maj 2018 kl. 14.35 skrev Manlio Perillo :
> 
> Il giorno mercoledì 2 maggio 2018 00:26:05 UTC+2, Ian Lance Taylor ha scritto:
> On Tue, May 1, 2018 at 1:28 PM, John Unland > wrote: 
> > 
> > So something like x/tools/cmd/assets or cmd/assets? 
> 
> Yes.  I might use a name more like cmd/embed. 
> 
> 
> > I was just now thinking about it more today and I was wondering if 
> > something 
> > like this could maybe be implemented into go build. Like how you can assign 
> > variables at build time: 
> > 
> > go build -ldflags="-X main.Foo=Bar" 
> > 
> > Into something like... 
> > 
> > go build -ldflags="-X main.Asset1=./SomeFileA main.Asset2=./SomeFileB" 
> > 
> > Think this would take a little more effort to integrate in but it's a 
> > interesting concept thou. 
> 
> Personally I think the code generation approach is simpler. 
> 
> 
> It is simpler but, isn't it very inefficient with large assets, since the 
> compiler eats a lot of memory?
> Maybe a better choice is to directly embed the code into the executable 
> image, as an example appending a zip archive at the end of the executable 
> (this at least works with ELF on Linux).
> 
> Using a zip archive appended to the end of the executable, you don't even 
> need to record the offset.
> The unzip tool just reports a warning:
> warning [xxx]:  ddd extra bytes at beginning or within zipfile
> 
> I have not tested it with the archive/zip package.
> 
> 
> Manlio 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] cross-compile mac to linux

2018-05-07 Thread Michael Banzon
It was specifically stated that the code was CGO - this approach won’t work 
unless there is a C compiler that is crosscompile enabled installed already - 
I’m guessing the question is how to do that.

In my experience the (by far) easiest way to do this is to set up a (Docker) 
container or a VM with the needed Linux toolchain and use that. As long as the 
target is Linux it is fairly easy (I am still to crack the Windows<->macOS 
cross compilation for my CGO code - which is also caused by SQLite).

--
Michael Banzon
https://michaelbanzon.com/

Den 7. maj 2018 kl. 07.22 skrev Rohit Jain :

GOOS=linux GOARCH=amd64 go build

Try this?

> On Mon, May 7, 2018 at 8:56 AM, Steven Roth  wrote:
> Can anyone point me to a recipe or guidance on how to set up a 
> cross-compilation environment on a Mac that will allow me to build 
> CGO-enabled Go code to run on Ubuntu?  The program I'm building is pure Go 
> except for an unavoidable dependency on libsqlite3.
> 
> Thanks in advance,
> Steve
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Rohit Jain
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Code completion w/o GOPATH

2018-08-09 Thread Michael Banzon


> I wonder how in a world of go modules without a GOPATH,
> code completion within editors is supposed to be implemented?

Wouldn't it work like it does now - looking in your imported packages?

There might be a "problem" with auto-importing and/or browsing packages 
available for import. For me that would be a good thing though - my GOPATH is 
usually very cluttered.

/ M

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Why is go starting multiple child process?

2018-09-16 Thread Michael Banzon
On Ubuntu you should be able to make it fancy and use htop with colouring of 
threads ;-)

/ Michael

Den 17. sep. 2018 kl. 06.56 skrev Patrick Smith 
mailto:pat42sm...@gmail.com>>:

I don't know about Ubuntu 16.04. On my Arch Linux system, 'pstree -V' shows 
"pstree (PSmisc) 23.1"

On Sun, Sep 16, 2018 at 9:28 PM 
mailto:the.warl0ck.1...@gmail.com>> wrote:
There's no -T in Ubuntu 16.04, am I wrong?

On Monday, September 17, 2018 at 11:54:05 AM UTC+8, Patrick Smith wrote:
Probably those are threads, not processes. Try 'pstree -T'. Also, I believe the 
variable name is GOMAXPROCS, with an S at the end.

--
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+unsubscr...@googlegroups.com.
For more options, visit 
https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SV: [go-nuts] New Modules and git clones

2018-11-14 Thread Michael Banzon
I have used the ”v0.0.0” as the version number – it seem to work.

/M

Fra: Russel Winder
Sendt: 14. november 2018 12:44
Til: GoLang_Nuts
Emne: [go-nuts] New Modules and git clones

I am giving the module system in Go 1.11.2 a whirl to get projects out of the
GOPATH environment. The dependencies include ones that have no tagged versions
in the Git repositories. The documentation implies that I can use "dev" as the
version number in the go.mod file for this situation. However, this just
causes a compilation failure:

   invalid module version "dev": unknown revision dev
I am hoping I am just misreading something about the documentation!

--
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Is it possible to export a variable from main package? If impossible, why?

2019-01-23 Thread Michael Banzon
Can you provide the output you get and the source you are compiling?

If you could also include the command line input+output it would probably help.

/M

Den 24. jan. 2019 kl. 07.13 skrev 伊藤和也 
mailto:kazya.ito.dr...@gmail.com>>:

Now I tried to use "Number" in the same package "main" in a different .go file 
in the same directly but I got the compile error "undefined: Number".


2019年1月24日木曜日 11時27分57秒 UTC+9 伊藤和也:

package main

var Number int = 100

func main() {

}

--
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+unsubscr...@googlegroups.com.
For more options, visit 
https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Is it possible to export a variable from main package? If impossible, why?

2019-01-23 Thread Michael Banzon
The question is what you are trying to accomplish - if you want two main 
packages share variables you could make a third package and have both main 
packages import that.

/M

Den 24. jan. 2019 kl. 07.40 skrev 伊藤和也 
mailto:kazya.ito.dr...@gmail.com>>:

What Francisco Dalla Rosa Soares says is right. I only compiled "b.go". Is it 
possible to import "main" package to other packages except "main"?

2019年1月24日木曜日 11時27分57秒 UTC+9 伊藤和也:

package main

var Number int = 100

func main() {

}

--
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+unsubscr...@googlegroups.com.
For more options, visit 
https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.