Another thing along the same lines... "releasing a package" is really not
something that requires effort for Go. There's no process... if the code
is in github, it's released. A lot of the questions ask about difficulties
in getting code from the maintainer to a consumer, but that just isn't a
I'm getting a similar error on Windows 10 with IntelliJ, even though it's
*not* cross-compiling...
Apparently IntelliJ needs "-N -l" for debugging (with delve...)
My installation was pretty standard (out of the box); but a simple:
package main
import "fmt"
func main() {
fmt.Print("hello")
}
fail
beware that mail.([]interface{}) will *panic* if what is in there is not a
[]interface{}. You should almost always use ", ok" form of type casting,
i.e.
list, ok := mail.([]interface{})
if !ok {
// return an error or something sane
}
// use list
On Friday, August 12, 2016 at 2:41:26 PM UTC
Unkeyed can be good to remind future you that you've changed the signature
of a struct and are now not populating all the fields. That cuts both
ways, since it means you *have* to go to every place you've created a value
of that struct and update it with a new value... but it also means that if
On Sat, Aug 13, 2016 at 7:29 AM, Anmol Sethi wrote:
> Keyed fields seem to be always better than unkeyed fields in a composite
> literal.
> Under what circumstances would I want to use unkeyed fields?
Keyed fields are better than unkeyed fields since keyed fields are
covered by the Go1 compatibi
On Sat, Aug 13, 2016 at 4:41 AM, Vasily Korytov wrote:
> Hi,
>
> I have an interface{} variable that can be either string or a list of string
> (yes, that's bad design, I know).
Your code below indicates that you're storing a []interface{} not an []string.
> Have I overlooked something and there
Thank you for this information. There is no timing information.
On Saturday, 13 August 2016 08:01:19 UTC+10, James Pettyjohn wrote:
>
> Here we go:
>
> WORK=/var/folders/j7/4pq3fms94f16lq7sljs3gd1cgp/T/go-build579975441
> site_www2
> mkdir -p $WORK/site_www2/_obj/
> mkdir -p $WORK/site_www2/_o
On Saturday, 13 August 2016 00:57:10 UTC+1, simon place wrote:
>
> aren't your "pseudo-closure"'s commonly know as "objects"?
>
>
In languages that have "objects" (and not the structs I'm using here that
serve the same function) the answer is yes.
Of course this is already known eg
https://www
aren't your "pseudo-closure"'s commonly know as "objects"?
--
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 opti
I don't think I've seen this discussed once with respect to golang, and
interested to see what others think, and more generally if anyone can give
insight into pratfalls for the non closure method
Here's a simple program using the usual introduction to what closures can
do https://play.golang.
My bad. I should have specified that I meant struct literals.
> On Aug 12, 2016, at 6:02 PM, Ian Lance Taylor wrote:
>
> On Fri, Aug 12, 2016 at 2:29 PM, Anmol Sethi wrote:
>> Keyed fields seem to be always better than unkeyed fields in a composite
>> literal.
>> Under what circumstances would
On Fri, Aug 12, 2016 at 2:29 PM, Anmol Sethi wrote:
> Keyed fields seem to be always better than unkeyed fields in a composite
> literal.
> Under what circumstances would I want to use unkeyed fields?
Keys aren't always useful, e.g.,
var colors = [...]string{"red", "blue", "green", "yellow"}
I
Here we go:
WORK=/var/folders/j7/4pq3fms94f16lq7sljs3gd1cgp/T/go-build579975441
site_www2
mkdir -p $WORK/site_www2/_obj/
mkdir -p $WORK/site_www2/_obj/exe/
cd /Users/jp/git/project/src/site_www2
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/site_www2.a -trimpath
$WORK -p main -complete
We've just been caught out by what I'd say is a massive gotcha about go
test!
When invoked with multiple packages the tests for said packages run in
parallel!
While this is fine if the tests themselves are totally self contained,
with no external dependencies, if they do well all bets are of
> While running tests in parallel is not a bad thing, and likely speeds up the
> testing process, it REALLY should be documented that multiple package tests
> will be run at the same time.
I agree that it's somewhat obscured as the documentation for the flag
is shared among many subcommands, but i
Keyed fields seem to be always better than unkeyed fields in a composite
literal.
Under what circumstances would I want to use unkeyed fields?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emai
Looks fine to me. You'll have to iterate anyway.
You can save a little perf by allocating directly the right size for your temp
slice, with make. Then use indexing instead of append.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
I can't run debug mode under Visual Studio Code. Everything seems
configure well, but no answer from the delve. I can run Debug and I can see
that delve process ruined, but no activity under Visual Studio Code. Can
someone help with that?
--
You received this message because you are subscribe
Thank you both -- yes, I see the problem. It was tricky to get the
questions right to apply across ecosystems with different infrastructure
and terminology; but we're particularly interested in comparing ecosystems
like Go and (much of) Swift that don't have central repositories with ones
like
Hi,
I have an interface{} variable that can be either string or a list of
string (yes, that's bad design, I know).
I need a []string to feed it to strings.Join (I need one string for output).
This way works, that is explicitly creating []string and copying each
element to it:
var list []strin
Maybe this is more OS related than Go, since Go just produces a static
executable, so please feel free to lock this.
I've built a simple tool, it works just fine in the terminal, both as a
local executable and when put in the PATH. But when I want to register it
as the default app for a given f
Sorry, I didn't see your longer high-level overview post--I see the vision
a bit more clearly now.
Have you used slack? It might be a good place to start discussion to hammer
out some details before moving onto a google doc. I find shared google docs
can be challenging without at least a founda
This is something I would be interested in working on/supporting. I have 14
month old twins so I have to limit my expectations for coding outside of
work these days, but this type of project I'd be keen on as an amateur
photographer/astrophotographer. I've often looked at contributing to
existi
Hello,
I think the best place to find someone who can understand the potential in
the idea in using go as the basis for an RTOS is this list. I do not have
the time to pursue the idea of "*gortos.com"* that + the hardware that
needs to go along with it (which I think is necessary to make enough
Because of this reason I started feeling it natural :D thanks Andrew
Gerrand for pointing out.
On Friday, November 18, 2011 at 9:47:18 AM UTC+5:30, Andrew Gerrand wrote:
>
> It's not just that. It also means that you can more easily re-order the
> lines of a literal without needing to worry abou
As one would want a clean Go library, I think this library should be
implemented from scratch in Go - there is also a better chance to get a
really good performing library, if it is designed in Go and not in C. One
obvious thing is, to do all heavy computations in parallel via goroutines.
Finally,
go test ./... | fgrep -v '[no test files]'
that should be perfectly sufficient to you
On Friday, August 12, 2016 at 10:28:08 AM UTC+3, Simon Ritchie wrote:
>
> > go test ./...
>
> Sorry, I should have said, I already tried that. The problem is, if you
> have any directories that don't contain a
> go test ./...
Sorry, I should have said, I already tried that. The problem is, if you
have any directories that don't contain any tests, you get complaints. For
each directory with no test files, you get a line on stdout containing "?"
and "[no test files]". This includes directories that ju
28 matches
Mail list logo