Try to get this package:
$ go get -u github.com/bilibili/kratos/tool/kratos
> go: finding github.com/bilibili/kratos v0.2.3
> go: downloading github.com/bilibili/kratos v0.2.3
> go: extracting github.com/bilibili/kratos v0.2.3
> go get: github.com/bilibili/kratos@v0.2.3 requires
> golang.org/x
Try to access https://news.kompas.com with http.Client
code here: https://play.golang.org/p/lr71n5No_8Z
It seems that tls handshake succeeds, but server does not write response?,
it keeps retrying until timeouts:
DNS Info: {Addrs:[{IP:202.146.4.17 Zone:}] Err: Coalesced:false}
> Conn Done:
> T
Hi Dave,
I haven't made it clear on the first post, sorry,
I am talking about the behavior of Go's net/http.Client, so there are no
browsers involved.
Go's net/http.Client will do redirections transparently for user, but there
are no exposed way of get the redirected url.
see https://play.gol
10 redirects")
}
return nil
}
On Monday, May 21, 2018 at 12:25:37 PM UTC+8, Darren Hoo wrote:
>
> if this is how the redirections go:
>
> A (original url) => B => C => D
>
> I want to know the url of request D
>
> the URL of A is never changed, and get
if this is how the redirections go:
A (original url) => B => C => D
I want to know the url of request D
the URL of A is never changed, and get the Location header from request is
impossible.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
On Wed, Jul 5, 2017 at 5:27 PM, Jan Mercl <0xj...@gmail.com> wrote:
> On Wed, Jul 5, 2017 at 11:03 AM Darren Hoo wrote:
>
> >>> what is the relation between `type literal` and `named type`,
> >>
> >> Orthogonality.
> >
> > Then `int` is not
On Wed, Jul 5, 2017 at 5:06 PM, Jan Mercl <0xj...@gmail.com> wrote:
> On Wed, Jul 5, 2017 at 11:03 AM Darren Hoo wrote:
>
> > what is the relation between `type literal` and `named type`,
>
> Orthogonality.
>
Then `int` is not named type.
`int` and `int64` are
On Wednesday, July 5, 2017 at 4:40:57 PM UTC+8, Jan Mercl wrote:
>
> On Wed, Jul 5, 2017 at 10:33 AM Darren Hoo > wrote:
>
> > So in https://talks.golang.org/2015/tricks.slide#5
> >
> > Other examples of type literals are int and []string,
> >
> >
Thanks all. I got it.
So in https://talks.golang.org/2015/tricks.slide#5
> Other examples of type literals are int and []string,
is actually not correct.
On Wednesday, July 5, 2017 at 3:59:57 PM UTC+8, Jan Mercl wrote:
>
> On Wed, Jul 5, 2017 at 9:54 AM Darren Hoo > wrote:
ednesday, July 5, 2017 at 3:26:13 PM UTC+8, Jan Mercl wrote:
>
> On Wed, Jul 5, 2017 at 9:17 AM Darren Hoo > wrote:
>
> > f1's type is func(int), and f2's type is main.f, they are different
> types, does implicit conversion happen here?
>
> It's not
package main
type u uint64
type f func(int)
func g(x int) {
}
func main() {
var a1 uint64 = 1000
var a2 u = a1 //why this is not OK
var f1 func(int) = g
var f2 f = f1 //while this is allowed?
f2(1)
}
f1's type is func(int), and f2's type is main.f, they are different types,
does implicit con
Try to access https://talks.golang.org/
Error: Server ErrorThe service you requested is not available yet.
Please try again in 30 seconds.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails
Try starting chrome from command line with option --ignore-certificate-errors
?
On Friday, March 13, 2015 at 7:19:07 PM UTC+8, Alex wrote:
>
>
> I made a certificate with the generate_cert.go file in the http package,
> and it works fine on firefox, but chrome wont accept it (with no options to
I am trying to understand Context by reading https://blog.golang.org/context
the code in https://blog.golang.org/context/google/google.go uses transport.
CancelRequest
Since http.Request now (I am using go 1.7.3) has context support now,
I think the code can be simpler now. This is my version of
erver isn't for production anyway. Best of luck in your
> deployment. Maybe you'll be able to find a use case for Go in your future
> endeavors. If not, that's cool too. Use the best tool to accomplish your
> goals. :)
>
> On Thu, Sep 29, 2016, 9:16 PM Darren
ls to write exactly the program you want,
>> then you can share it with the world via go get.
>>
>> On Friday, 30 September 2016 12:14:26 UTC+10, Darren Hoo wrote:
>>>
>>> One thing that I really like about python is this one command line to
>>> serve
One thing that I really like about python is this one command line to serve
static files:
python -m SimpleHTTPServer
This is very convenient.
Now I just want to use Go to do the same thing, I have to copy the snippet
from
https://github.com/golang/go/wiki/HttpStaticFiles and go run i
es are. It
> would just be less deterministic.
>
> On Thu, Sep 1, 2016 at 10:38 AM Darren Hoo > wrote:
>
>> Got it, using buffered channel works for me
>>
>> ints := make(chan int, 1)
>> done := make(chan bool, 1)
>>
>> go func() {
>>
; exit status 2
>
> main.go:25 is the line that says `done <- true`.
>
> The `done` channel isn't buffered and the first loop through will select
> that path, but there is not another goroutine selecting from done. so f()
> never returns. Deadlock.
>
> On Thu, Sep 1, 20
var wg sync.WaitGroup
ints := make(chan int, 1)
done := make(chan bool)
go func() {
for i := 0; i < 3; i++ {
ints <- i
}
close(ints)
}()
f := func() {
wg.Add(1)
defer wg.Done()
for {
i, ok := <-ints
if !ok {
done <- true
return
}
}
}
exit:
for {
select {
case <-done:
break exit
default:
f()
}
goimports won't remove empty lines. is that a feature?
goimports on this:
import (
"bufio"
"fmt"
"math"
"strconv"
"time"
"math/rand"
"os"
)
will not become
import (
"bufio"
"fmt"
"math"
"math/rand"
"os"
"strconv"
"time"
)
On Friday, July 15, 2016 at 1:34:36 PM UTC+8, bradfitz wrote:
>
> goi
21 matches
Mail list logo