https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com
<https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com?utm_medium=email_source=footer>.
--
Kyle
--
You received this message because you are
I first asked this on https://reddit.com/r/golang but the contribution
guide on github recommends this forum, so I'll post here before finally
raising an issue on github if this appears to be a real bug.
ORIGINAL POST:
I came across this issue in some code I was reviewing today where a
I'd use godotenv in this case. True, it will require a .env file with a
path variable in it and true it won't be as having consts but it will do
the job.
import (
"os"
"github.com/joho/godotenv"
)
func init() {
if os.Getenv("MODE") != "PROD" {
godotenv.Load()
}
}
// ...
//
package, of
course.
-- Kyle
On Tuesday, December 22, 2020 at 2:30:55 PM UTC-6 ben...@gmail.com wrote:
> Wow -- yes, that's pretty significant! (Though point taken about "real
> workloads".) Thanks for sharing this.
>
> On Tuesday, December 22, 2020 at 11:44:25 PM UTC+13 arn
Vasiliy,
Take a look at the supported examples. sqlc has no problem handling five
joins and a having clause.
Kyle
On Wednesday, December 11, 2019 at 12:18:20 PM UTC-8, Vasiliy Tolstov wrote:
>
> Thanks! But how about real world cases like joining 5 tables and using
> having and ot
guided walk through and
more example code.
Happy to answer any questions you have about the project.
Cheers,
Kyle
--
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
the Getting Started[1] guide.
Cheers,
Kyle
[0] https://github.com/kyleconroy/sqlc
[1] https://github.com/kyleconroy/sqlc/blob/master/README.md#getting-started
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this grou
You'll want to check out `gomock` and `mockgen`. You'll need to write an
interface to be able to mock, so you may need to write a receiver struct to
encapsulate os.Hostname() or whatever you need to mock, then mock your
HostnameGetter (surely a better name than that), maybe?
type OsClient
You'll want to look into gomock and mockgen. To get started mocking,
you'll need an interface, so maybe writing a receiver function
encapsulating os.Hostname(), then consuming that with an interface.
type OsClient struct {}
func (o *OsClient) GetOSHostname() (string, error) { return
I recommend letting the go tool handle this. Leave the dependency out of
the go.mod file entirely. Run go build as normal, and it will automatically
determine the version strings for the dependencies and insert them into
your go.mod for you.
On Wed, Nov 14, 2018 at 5:43 AM Russel Winder wrote:
-5, Burak Serdar wrote:
>
> On Wed, Oct 17, 2018 at 10:30 AM Kyle Butz > wrote:
> >
> > Hi All!
> >
> > I'm having trouble understanding whether a new http.Client{} with no
> Transport set will use a new copy of DefaultTransport, or the global?
> &
to the global DefaultTransport defined in
transport.go?
Thanks for any tips!
Kyle
--
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+unsub
So, what would be the appropriate use-cases for this; I.E, using a map
index expression as the value?
On Thursday, July 7, 2016 at 10:05:42 AM UTC-4, Kyle Stanly wrote:
>
> I noticed that the specification states:
>
> "As with an assignment, if present the operands
I noticed that the specification states:
"As with an assignment, if present the operands on the left must be
addressable or map index expressions; they denote the iteration variables."
Here is the thing I am having trouble imagining... if the iterator keeps a
snapshot of the map at the time
Very educational slides, I'll save for later, thanks.
On Monday, June 27, 2016 at 5:54:23 PM UTC-4, Dave Cheney wrote:
>
> What are the exact commands you used?
>
> It is easy to misuse proof, here is a slide with some of the gotchas.
>
>
>
r
however.
On Monday, June 27, 2016 at 5:10:39 PM UTC-4, Ian Lance Taylor wrote:
>
> On Mon, Jun 27, 2016 at 1:52 PM, Kyle Stanly <thei...@gmail.com
> > wrote:
> > I'd also like to mention I did try both 'runtime/pprof' and
> > github.com/pkg/profile, both yield the
t;
> On Mon, Jun 20, 2016 at 5:45 PM Kyle Stanly <thei...@gmail.com
> > wrote:
>
> The GC is precise, it will not confuse an integer and a pointer.
>
> Keeping a a pointer in a uintptr as a "reference" to something is safe iff
> it will never be casted bac
17 matches
Mail list logo