Thanks!
The bot package was just an example. This is a general concern IMHO.
Interfaces do nicely when we want to hide implementation details (on
accepting things as an interface). For example package A is a low-level,
infrastructure package at Infrastructure layer/area. Now at the Interfaces
Is there a problem created from sharing the package or creating a separate
package? Or why is that dependency a problem?
There's some knowledge about the requests/responses shared between
packages. Trying to hide it, doesn't gain anything -- it only makes the
sharing implicit rather than
I've put together a blog post explaining the implementation concepts behind
CPU, allocation and block profilers.
It is not as detailed as some of the original articles, but hopefully
useful to pprof users in terms of better understanding what to expect from
the data.
Could you edit your question, it's unclear and format your code.
--
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
This has already been asked at golang-sql
(https://groups.google.com/forum/#!topic/golang-sql/HNvcgScdyt8), but no
answer yet.
Maybe the wider audience here has a solution.
Hi,
Is there a way to convert a driver.Rows to an sql.Rows ?
Oracle is a strange, inconsistent beast where you can return
While debugging a program which had a panic due to an attempt to call a
method on a value of an interface typeš, I came across the behaviour I
find strange, and would like to get help understanding what happens.
The behaviour is exhibited by this simple program:
package main
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"sync"
"time"
)
var wg sync.WaitGroup
func main() {
start := time.Now()
ch := make(chan string)
for _, url := range os.Args[1:] {
wg.Add(1)
go fetch(url, ch)
}
for range
For CUDA you have, cu package that provides an idiomatic interface to the
CUDA Driver API. https://github.com/chewxy/cu
--
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
I try writing the program and run it. the program is as following:
package main
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"time"
)
func main() {
start := time.Now()
ch := make(chan string)
for _, url := range os.Args[1:] {
go fetch(url, ch)
In this case, the "code golf" solution seems
clearer: https://play.golang.org/p/Jxkf2Vheml
On Monday, November 13, 2017 at 3:57:57 PM UTC-8, peterGo wrote:
>
> Christian,
>
> Your specialized convertCharToInt32 function, which returns []uint32, is
> slow in comparison to a more general
The runtime will still finish any in-progress garbage collection.
debug.SetGCPercent only affects the trigger point (when to start) and the
pacing (at what rate to mark the heap).
On Monday, November 13, 2017 at 2:40:29 PM UTC-8, T L wrote:
>
> or runtime will still try to finish the current
Konstantin, your description is correct. The code is trying to load a
function pointer out of an itab, but the pointer to the itab is nil.
I think this is actually a bug. If you have an interface with more than
pagesize/ptrsize methods in it, this code might not panic when it should.
On
I believe the people over at https://golangbridge.org/ are responsible for
the Slack as well, so I would contact them.
On Monday, November 13, 2017 at 1:41:13 PM UTC-5, Vlad Didenko wrote:
>
> My phone got stolen, so I am locked out of the https://gophers.slack.com/
> 2FA.
>
> Slack tells to
Bryan,
Use the test case from the question: buffer := "83f982d600c1caca7a6".
https://play.golang.org/p/1gN7Y4ajOH
Peter
On Monday, November 13, 2017 at 7:42:16 PM UTC-5, Bryan Mills wrote:
>
> In this case, the "code golf" solution seems clearer:
> https://play.golang.org/p/Jxkf2Vheml
>
> On
Filed issue https://github.com/golang/go/issues/22703
On Monday, November 13, 2017 at 3:50:58 PM UTC-8, Keith Randall wrote:
>
> Konstantin, your description is correct. The code is trying to load a
> function pointer out of an itab, but the pointer to the itab is nil.
> I think this is
Christian,
Your specialized convertCharToInt32 function, which returns []uint32, is
slow in comparison to a more general HexToUint function.
BenchmarkHexToUint32-8 200088.9 ns/op 16 B/op2 allocs/op
BenchmarkCharToInt32-8300 438 ns/op 96 B/op 22 allocs/op
hi,
i had the same issue. My fix was to upgrade or downgrade git. The
latest git version 2.15.0.windows.1 works ok.
On Monday, November 13, 2017 at 5:33:55 PM UTC+2, Patrick Hadlaw wrote:
>
> I've posted my problem on stack overflow and could not fix it!
>
>
This has been reported previously and appears to be a bug in git which causes
come.exe. Sorry I don’t have the details, how his could be possible escapes me,
but I’ve long since given up being surprised by the bizarre layer violations in
windows.
--
You received this message because you are
Yes, it looked like a typo to me.
Truncating the string to an even number of characters gives the same
results as the original snippet:
https://play.golang.org/p/avf6xqnpEn
It's also not difficult to pad the input, if that's the desired behavior:
https://play.golang.org/p/Q6C9SBhQB5
(Padding
On Mon, Nov 13, 2017 at 1:42 PM, Konstantin Khomoutov
wrote:
> While debugging a program which had a panic due to an attempt to call a
> method on a value of an interface typeš, I came across the behaviour I
> find strange, and would like to get help understanding what happens.
Hi Christian,
just a form note - it would be preferable and easier for the readers to put
a code snippet into https://play.golang.org and share the link, similar to
this one:
https://play.golang.org/p/p3TNDze923
It also helps to make sure that program is syntactically correct (not clear
in
On 11/13/2017 04:10 AM, 2891132l...@gmail.com wrote:
> for range os.Args[1:] {
> fmt.Println(<-ch)
> }
> fmt.Printf("%.2fs elasped\n", time.Since(start).Seconds())
> }
If I understand correctly, you want fetch() to get each URL twice but
you only read from the 'ch'
Sometimes you want multiple Conds which share the same Locker. When you
want it, it's frequently essential and very annoying if you can't have it.
On Sun, Nov 12, 2017 at 7:02 PM T L wrote:
> .
>
> --
> You received this message because you are subscribed to the Google
The hack would be to use unsafe after converting it to a byte slice to cast
to a Pointer and cast that back to a uint32 slice. This is bad. Do not do
this.
Go's ethos is pretty strongly against 'super cool hacks' or 'code golf'
style statements that perform magic to stuff a lot of code into
>
> You guys are great. Not only did you explain at length, what I was
> misunderstanding, but you offered several solutions.
>
Thanks to one and all!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
Concrete questions after the question feedback at Stack Exchange:
Specific features used as user-facing conveniences are:
- Provided the license in a standard location
- Most useful API functions highlighted in the front-page README
- All Exported functions documented via GoDoc, made sure it
Is there support for vsan mgmt APIs in govmomi similar to pyvmomi? What I
am specifically looking for is to be able to query vsan cluster health
summary
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
*fst* is the package I posted to practice community-related workflows,
including writing documentation, using *travis-ci*, setting up vanity URL
redirection. The *fst* package adds convenience routines for testing
filesystem-related logic, helps to create, clone, cleanup, and compare
My phone got stolen, so I am locked out of the https://gophers.slack.com/
2FA.
Slack tells to ask project admins to temporarily reset @FA on the account,
but I found no way to find who are the admins for the gophers workspace.
Anyone knows?
Oh, and FWIW:
On Mon, Nov 13, 2017 at 12:45 PM, 'Stephan Schweitzer' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> It seems to me, that I can break the type system with simple assignments.
>
For that definition of "breaking the type system", you don't even need
assignments:
func
On Mon, Nov 13, 2017 at 12:45 PM, 'Stephan Schweitzer' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
>
>- Why are interfaces comparable by default?
>
> A very common comparison on interfaces is "if err == io.EOF". It also
enables you, in general, to use interfaces as map keys (or,
I've posted my problem on stack overflow and could not fix it!
https://stackoverflow.com/questions/46392778/golang-crashing-windows-console
I'm running Windows 10, installed go through x64 msi installer. Basically,
whenever I run Go in cmd with an argument (build, env, list, get...) the
program
I recently ran into an issue where Chrome was opening additional
connections to my http Server. When I went close to the Go app, instead of
just immediately closing after calling server.Shutdown, in lingered until
the server was forcefully shutdown by my shutdown context. The issue is
that
I have a question about the following code-snippet:
type I interface {
DoSomething()
}
type F func()
func (f F) DoSomething() {
f()
}
func A() {
fmt.Println("A")
}
func B() {
fmt.Println("B")
}
func test() {
On Monday, November 13, 2017 at 10:33:55 AM UTC-5, Stephan Schweitzer wrote:
>
> I have a question about the following code-snippet:
>
> type I interface {
> DoSomething()
> }
>
> type F func()
>
> func (f F) DoSomething() {
> f()
> }
>
> func A()
I also ran into this issue recently. I think this is a dup of
https://github.com/golang/go/issues/21204. This issue can be mitigated if
you set some reasonable ReadTimeout on the http.Server, which causes the
http.StateNew connection to timeout (a connection stays in this state until
something is
On Mon, Nov 13, 2017 at 4:00 PM <2891132l...@gmail.com> wrote:
> I know your meaning.But I still can't get the result I want.
> this is the server program:
> package main
>
> import (
> "fmt"
> "net"
> "os"
> "strings"
> )
>
> func main() {
>
> listener, err := net.Listen("tcp", "0.0.0.0:400")
>
On Monday, November 13, 2017 at 10:10:22 AM UTC-5, Thomas Bushnell, BSG
wrote:
>
> Sometimes you want multiple Conds which share the same Locker. When you
> want it, it's frequently essential and very annoying if you can't have it.
>
Embedding doesn't prevent this.
I ask this question is for
or runtime will still try to finish the current running task?
--
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
39 matches
Mail list logo