> Anyway, as I have mentioned before, this solves nothing when multiple
> versions of a nested dependency is needed by project dependencies.
This is a problem that's solved by vgo. Have a look into that.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
On Fri, Apr 20, 2018 at 8:26 PM, Kaveh Shahbazian
wrote:
>
> Is it safe to access slices that shares a back array concurrently? (Assuming
> the length of slices will not change)
It's safe to read from them concurrently. It's not in general safe to
modify them concurrently.
Ian
--
You received
I am pretty sure that you will run into problems with this. On one hand
passing pointers could lead to a write after a read, and on the other hand
with pass by value you could get an out of date value and then stomp over
another process write. I'm pretty sure the race detector will flag this.
Y
Is it safe to access slices that shares a back array concurrently?
(Assuming the length of slices will not change)
--
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
Is any of the following set `HTTPS_PROXY', `HTTP_PROXY' ? The
DefaultTransport pays attention to those env vars to decide whether to
use a proxy or not. If that's not the case, what is the error that
you're getting ?
cheers,
-js
yyq2...@gmail.com writes:
> http.Get doesn't work with default tr
url := "https://google.com/";
req, err := http.NewRequest("GET", url, nil)
if err != nil {
log.Fatal(err)
fmt.Printf(err.Error())
return
}
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
fmt.Printf(err.Error())
Indeed it is possible to set the $GOPATH in a shell. And if I use other
tools with a specific project, for example VSCode, then I have to start all
of them from the same terminal. Which is not the most desirable outcome.
Anyway, as I have mentioned before, this solves nothing when multiple
ver
Hi
any alternative library available for
"github.com/google/gopacket" which generate live traffic
Regards,
Binu
--
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,
There could have been a data race in your code with the usage of allMax
variable which is updated and checked by multiple goroutines. But you are
saved by the use of mutex. All shared variables, in general, are subject to
data races when there is a write involved. The local variables you create
http.Get doesn't work with default transport, but works fine if I set a custom
as following(uncomment the two lines)
package main
import (
"net/http"
"io/ioutil"
"fmt"
"log"
)
func main() {
//tr := &http.Transport{}
//http.DefaultClient.Transport
Il giorno giovedì 19 aprile 2018 14:48:09 UTC+2, Kaveh Shahbazian ha
scritto:
>
> Is it possible to tell go tools to get the go-path from a source other
> than $GOPATH?
>
>
No, but you can of course set the GOPATH environment variable for the go
tool.
As an example, on an UNIX shell:
$ GOPATH=$
Den fredag 20 april 2018 kl. 16:11:36 UTC+2 skrev Ian Lance Taylor:
>
> On Fri, Apr 20, 2018 at 7:09 AM, Robert Bielik > wrote:
> >>
> >> Look at how os.Stdin and friends are initialized in os/file.go.
> >> https://golang.org/src/os/file.go#L51 .
> >
> >
> > Hmm... the syscall vars are platf
On Fri, Apr 20, 2018 at 7:09 AM, Robert Bielik wrote:
>>
>> Look at how os.Stdin and friends are initialized in os/file.go.
>> https://golang.org/src/os/file.go#L51 .
>
>
> Hmm... the syscall vars are platform specific. Is there a way to do this
> cross-platform ?
>
> Btw. the syntax worked on lin
>
>
> Look at how os.Stdin and friends are initialized in os/file.go.
> https://golang.org/src/os/file.go#L51 .
>
Hmm... the syscall vars are platform specific. Is there a way to do this
cross-platform ?
Btw. the syntax worked on linux, but not Windows.
--
You received this message because
Ok, with the below syntax I managed to write to fd 4, and on the bash cmd
line do 4>&2 to redirect to stdout.
/R
Den fredag 20 april 2018 kl. 15:03:41 UTC+2 skrev Robert Bielik:
>
> Exactly how would the call on the child side look ?
>
> file := os.NewFile(uintptr(3), "fd3")
>
> ?
>
> Den freda
On Fri, Apr 20, 2018 at 6:03 AM, Robert Bielik wrote:
>
> Exactly how would the call on the child side look ?
>
> file := os.NewFile(uintptr(3), "fd3")
>
> ?
Yes (except that if you use a literal 3 note that Go constants are
untyped so you don't need to use an explicit type conversion to
uinptr).
Exactly how would the call on the child side look ?
file := os.NewFile(uintptr(3), "fd3")
?
Den fredag 20 april 2018 kl. 14:54:29 UTC+2 skrev Ian Lance Taylor:
>
> On Fri, Apr 20, 2018 at 5:22 AM, Robert Bielik > wrote:
> >
> > I have an application where I'd like to be able to pipe data in/o
On Thu, Apr 19, 2018 at 9:35 PM, wrote:
>
> i noticed that html/template escapes a URI using small letters. For example,
> the following code outputs "%e5%af%bf%e5%8f%b8", not "%E5%AF%BF%E5%8F%B8".
>
> t, _ := template.New("foo").Parse(`{{define "T"}} href="/{{.}}">{{end}}`)
> t.ExecuteTemplate(o
On Fri, Apr 20, 2018 at 5:22 AM, Robert Bielik wrote:
>
> I have an application where I'd like to be able to pipe data in/out, but not
> on stdin/stdout/err, but on other file descriptors. How to ?
If you are on a Unix system, on the parent side see the ExtraFiles
field of os/exec.Command, and on
Or, just for completeness, https://github.com/cxreg/smartcd
On 20 April 2018 at 13:45, unknown wrote:
>
> You can use direnv[1] to achieve what you want
>
> [1]: https://direnv.net/
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To uns
You can use direnv[1] to achieve what you want
[1]: https://direnv.net/
--
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
i noticed that html/template escapes a URI using small letters. For
example, the following code outputs "%e5%af%bf%e5%8f%b8", not "
%E5%AF%BF%E5%8F%B8".
t, _ := template.New("foo").Parse(`{{define "T"}}{{end}}`)
t.ExecuteTemplate(os.Stdout, "T", "寿司")
(See https://play.golang.org/p/9caza-3ojur )
Keith Brown writes:
> I would like to have a tool for testing infrastructure components. I
> stumbled across Ginkgo. Does anyone use it?
Yes, it is being used by multiple CloudFoundry projects [1]
> Does it need a go compiler for tests?
Yes.
> My intention is to write simple tests, "Is serve
I have an application where I'd like to be able to pipe data in/out, but
not on stdin/stdout/err, but on other file descriptors. How to ?
Regards
/R
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receivi
Hello, all
Just published a new blog post about hacking the DJI Tello drone using Go.
Please check it out:
https://gobot.io/blog/2018/04/20/hello-tello-hacking-drones-with-go/
Thank you!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsu
I personally think that in the specific case of OOP code syntactic sugar
declarative structuring stuff - and maybe also godoc header comments such
as within type struct and type interfaces would make Go code even more
readable. There is limits to how far readability and consequential
maintainab
26 matches
Mail list logo