GOP is a project manangement tool for building your golang applications out
of GOPATH. Also this means it's not go-getable. GOP copy all denpendencies
to src/vendor directory and all application's source is also in this
directory.
A normal process using gop is below:
git clone
Keep in mind that you can't assume vcs info is available at build time. They
may be building from a downloaded tarball, in which case you *may* have a
Gopkg.lock (if everyone uses dep) but not much else. They may be Debian and
build from source packages where the Go compiler sees no version
On Wednesday, 16 August 2017 01:58:00 UTC+2, Eric Johnson wrote:
>
> [ ... ]
> I'm happy to contributing to further exploring implementation, but I
> figured I'd start by asking a question, in case someone is already working
> in this direction.
>
> I was thinking that it ought to be possible
On Wednesday, 16 August 2017 05:16:45 UTC+2, Nate Finch wrote:
>
> This is an unfortunate side effect of using ... (a variadic) in append.
> Zero is a valid number of arguments to pass to it.
>
>>
>>
>> But append is not a normal function, it is an intrinsic, so the compiler
could implement a
On Wed, Aug 16, 2017 at 7:01 PM, yihao yang wrote:
>
> I want to take advantage of writev when writing a file. But I didn't find
> the interface that accepts a [][]byte parameter.
> What can I do?
At present we only support writev to network sockets. You can use it
by
Just a minor correction:
go tool objdump showed that *golang does not touch the pointer value before
overwriting it*.
The situation does occur nevertheless because obj.data may be nil [0x0,0,0]
initially, and length/capacity are assigned before the data pointer is set:
obj.data : [0x0,0,0]
Hi,
I want to take advantage of writev when writing a file. But I didn't find
the interface that accepts a [][]byte parameter.
What can I do?
Thanks,
Yihao
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and
Sometimes, I use:
a := []int{ 1, 2, 3 }
b : = append([]int(nil), a...)
to copy a slice.
On Wednesday, August 16, 2017 at 12:31:13 PM UTC-7, Nate Finch wrote:
>
> Wrote it up as an issue: https://github.com/golang/go/issues/21482
>
> and I agree that using append to assign to a different variable
Hi
I tried to use prepared statements and it works first time, but fails on
second query. Ie code like
tx, err := db.Begin()
if err != nil {
log.Fatalf("Error starting tx: %v", err)
}
defer tx.Rollback()
st, err := tx.Prepare("select foo from t where id=?")
if
Wrote it up as an issue: https://github.com/golang/go/issues/21482
and I agree that using append to assign to a different variable than the
one in the append call is almost always going cause surprising behavior
but it's less clearly a mistake than append with only a single argument.
On
My guess is that all those files are covered by the LICENSE file at
the top level, but CC'ing Nigel to double check.
Ian
On Wed, Aug 16, 2017 at 11:50 AM, wrote:
> Hello,
>
> I was wondering if I should assume BSD 3 clause licenses for all the files
> located under
>
>
Hello,
I was wondering if I should assume BSD 3 clause licenses for all the files
located under
x/image/testdata and x/image/font/testdata
since there are no licese notes regarding those files (fonts and images).
Thanks for the input and I am sorry if this is not the right place for this
I note it as something for Go 2, if only because it would be good to
standardize it across all Go binaries, so it was possible to introspect
*every* Go executable. Otherwise, I have to push to get all teams using go
to adopt the same approach to building in this information, rather than
having
One of the things I love about Go is that the standard library is very
readable, even for beginners (relative to the standard libraries of other
languages).
I think the database/sql package is great. The way it uses interfaces to
handle testing is a good example of good quality code IMO.
On
On Tue, Aug 15, 2017 at 04:58:00PM -0700, 'Eric Johnson' via golang-nuts wrote:
> As I scan reports of vulnerable software, I'm concerned that it is
> impossible to tell, from a Go binary, what was used to build that binary.
A lot of projects are already doing this, if somewhat indirectly: they
Hi,
Have you tried the golang.org/x/mobile/example/network example? It's a
"pure" Go app that doesn't use Java bindings, but its network access
properties should be the same.
If that works, you could modify golang.org/x/mobile/example/bind to
introduce a simple http.Get (or net.Dial) and see
Just in case it's not clear, since I've gotten a few responses from
contractors:
We're looking for full time employees only. Not contractors.
You must live and be authorized to work in the United States.
Thanks!
-Nate
--
You received this message because you are subscribed to the Google
As far as I'm concerned, `defer resp.Body.Close()` is perfectly cromulent and
there's no need to for error checking contortions to satisfy the lint tool. If
we're talking about a http.Request I doubt that the close can ever fail (I
haven't checked; but it doesn't seem like something that would
Oh, thanks a lot Egon,
Your neat and elegant code is very helpful for me to get the idea and get
started.
Just FTA, in case someone is also reading this, more onto *sorting the
slice*, here is my archive from this list:
https://groups.google.com/d/msg/golang-nuts/WV4d-0UTvLo/tJOoqOf9AgAJ
I
Agreed, append with only one argument doesn't look good and should be
vetted.
As a superset of this problem, any use of
*a* = append(*b*, *c*)
with *b* != *a* (i.e. not assigning back to the same slice variable)
looks either broken or cryptic me.
This holds whether *c* is zero or one or more
Never mind the tool is right I could print the error or something like
that, I assumed you couldn't do anything useful with the error anyway in a
defer
On Wednesday, August 16, 2017 at 2:05:39 PM UTC+2, Gert wrote:
>
> To pass errcheck I need to do something like
>
> defer func() { _ =
To pass errcheck I need to do something like
defer func() { _ = resp.Body.Close() }()
instead of
defer resp.Body.Close()
Is this something the errcheck tool can figure out to mark as valid instead
or does the errcheck tool need help from the compiler so the second case is
also ok?
--
You
Do you mean ordered map or sorted map... either way, as long as the N is
small, then you can use a slice to provide the extra functionality:
1. sorted map https://play.golang.org/p/oLM4u5HwQ6
2. ordered map https://play.golang.org/p/OFXhFyyrmZ
On Wednesday, 16 August 2017 03:17:29 UTC+3, Tong
On Wed, Aug 16, 2017 at 1:58 AM 'Eric Johnson' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> I'm happy to contributing to further exploring implementation, but I
figured I'd start by asking a question, in case someone is already working
in this direction.
That'd be a nice tool for
That makes sense, and in fact my XML output with s gets parsed later
correctly. My personal use case has input XML files with literal LF
characters, and it's frustrating that when my Go program modifies that
file, they're all converted, which makes my git commit including that XML
file messy.
On Tue, Aug 15, 2017 at 02:42:45PM -0700, Keith Brown wrote:
[...]
> Now, as I learn golang, are there any worth while projects I can use as
> reference for writing high quality go code? I am not necessary looking for
> code standards but more of code setup and quality so I can practice those
26 matches
Mail list logo