Hi all,
Just wanted to announce the release of usql 0.2.0, the universal
command-line client for SQL databases. Binaries are available for download
here: https://github.com/knq/usql/releases
Or, install the usual Go way:
go get -u github.com/knq/usql
I've significantly fixed how input is
On Tue, 14 Mar 2017 07:12:01 -0700
Ian Lance Taylor wrote:
> > I was thinking about the type safety of uint in go, and comparing
> > it for a similar problem.
> >
> > If I have this go code:
> >
> > var x uint
> > x--
> >
> > The value of x is then the maximal value of uint, which is probably
> >
This is tangential, but if we're talking about style, you might be
able to simplify this line
ret = PropertiesList(ret).Append(PropertiesList(temp))
to be
ret = PropertiesList(ret).Append(temp)
if the PropertiesList underlying type and the temp variable's type are
what I'm guessing they are: []*Pro
On Fri, Mar 17, 2017 at 5:02 AM, 'simon place' via golang-nuts
wrote:
> uint - uint = int
Well, if the first uint is maxUint and the second uint is minUint
(i.e. zero), then the difference between them will overflow an int.
--
You received this message because you are subscribed to the Google G
I think this is too premature to make this call. Javascript is a language
with no type system and it is relying a lot on runtime behavior. Yet, it
was a "language of the future" when it was created and I don't think it was
envisioned to become as big as it got. Attempts are replacing it are going
s
A language with such a "simple" type system, which rely that much on
runtime behavior is hardly a language of the future. But Go might be a blue
print for what language of the futures will have to provide in terms of
developer experience. Go is too divisive to get widely adopted or to
replace a
Did not need such analysis to claim such assertion,
A language that does not bloat its users with semi colon (one for you
https://groups.google.com/forum/#!topic/golang-nuts/rzLzp_Z74ik%5B1-25%5D),
parenthesis where useless,
with automatic formatting,
tries to solve "les querelles de clocher",
yeah, i did write it like it before,
but i want stop to shadow my variables as much as possible,
i found mistakes happens too easily with that writing.
On Thursday, March 16, 2017 at 7:28:17 PM UTC+1, rog wrote:
>
> I'd be inclined to write it something like this:
>
> https://play.golang.org/p
I d like to, but when I write,
// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*Properties, error) {
//-
ret := []*Properties{}
if temp, err := runDf(); err != nil {
return ret, err
}
ret = PropertiesList(ret).Append(Pr
Missing a C function
void initializeProfile(_profile *profile, bool create)
{
if (create == true)
{
profile->dateOfBirth = NULL;
}
profile->profileId = 0;
memset(profile->userName.first, '\0', sizeof(profile->userName.first)); :
memset(profile->userName.last, '\0', sizeof(profile->userName.las
I'd be inclined to write it something like this:
https://play.golang.org/p/_CRQ86vHfq
On 16 March 2017 at 12:11, wrote:
> Hi,
>
> golint will report
>
> if block ends with a return statement, so drop this else and outdent its
> block (move short variable declaration to its own line if necessar
this sort of thing came up for me recently, in that i was thinking nicer
built-in's would operate like this;
float32 * float32 = float64
so also
uint - uint = int
in a way, type safety (native type isolation) is kind of causing an issue,
and that maybe always using big (long) numbers during d
Early returns are fine. You don't need all those else blocks.
// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*Properties, error) {
//-
ret := []*Properties{}
if temp, err := runDf(); err != nil {
return ret, err
}
ret
I have issue when using cgo with c struct array.
My program as follow:
I have struct in c and contain a pointer to a c struct array.
In C, I provide a initialize function (take two parameter: the pointer to
the variable, the length of the array inside the variable) to malloc the
memory of
It's saying you don't need the else clauses since you have returned in
the if clause.
On Thu, 16 Mar 2017, at 05:11 PM, mhhc...@gmail.com wrote:
> Hi,
>
> golint will report
>
> if block ends with a return statement, so drop this else and outdent
> its block (move short variable declarat
Hi,
golint will report
if block ends with a return statement, so drop this else and outdent its
block (move short variable declaration to its own line if necessary)
(golint)
for this code,
// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*
Hi all,
I have a project where I want to use grpc-gateway (written in Go) to expose
a gRPC endpoint via REST. I've managed to get it to work with gateway parts
compiled with Go into a separate
executable, however, I would really like to package the gateway into the
same library as the gRPC endp
Michael,
"Now, for personal opinion, I would share a tremendous frustration that
programmers often don't think at all about these issues and thereby allow
their thinking to be shallow. My clearest example is code like "k=i+j" or
"k = i*j" both of which are common."
Are you shocked—shocked—to f
Interesting/fun article where Erik Bernhardsson analyzes data about moving
from one programming language to another
https://erikbern.com/2017/03/15/the-eigenvector-of-why-we-moved-from-language-x-to-language-y.html
--
You received this message because you are subscribed to the Google Groups
"go
As some posters have already said, it depends what you are trying to test.
If you want to test what your solution does when it receives a
randomly-generated number, then you don't need to use random numbers. You can
hide the generation of the random number in a type which is defined by an
in
On Thu, 16 Mar 2017 03:07:44 -0700 (PDT)
ikkini wrote:
> For anyone trying this: If you 'break userAuthLoop, you'll end up
> below the label, which equals success. Probably not what you want :/
> instead, I'm now using 'break' and authErr, which gives me the
> desired behavior.
A tangential issu
For anyone trying this: If you 'break userAuthLoop, you'll end up below the
label, which equals success. Probably not what you want :/
instead, I'm now using 'break' and authErr, which gives me the desired
behavior.
diff --git a/ssh/server.go b/ssh/server.go
index 37df1b3..0f4dd74 100644
--- a/s
Yes, there are cases for integer domain wraparound just as there are cases
for exception at the limits.
The argument FOR is that "computers work that way." Since ENIAC, there have
been overflow condition flags, but there have rarely been
overflow/underflow panic traps. (Either no support, or suppo
On 14 March 2017 at 08:48, Eyal Posener wrote:
> I was thinking about the type safety of uint in go, and comparing it for a
> similar problem.
>
> If I have this go code:
>
> var x uint
> x--
>
> The value of x is then the maximal value of uint, which is probably not what
> the gother wanted (I th
Hi Ingo,
>
> v.FieldByNameFunc(func(fieldName string) bool {
> field, _ := v.FieldByName(fieldName)
> name := field.Tag,Get("name")
> if len(name) == 0 {
> name = fieldName
> }
> //
> return false
> })
Sorry for my bab explain.
So tag name is more priority for me then I need to check if a field
I prefer to accept that multiple errors can occur.
https://pocketgophers.com/handling-errors-in-defer/
--
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-nut
What checks are you doing on struct field names and tags? That will be crucial
to answering your question.
--
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
You could also capture a (p)random stream as a test data vector and use it
in lieu of the PRNG during tests. This is the same as seeding iff and only
iff the PRNG is never changed, Should that change, then so will the tests
unless you capture a test vector now. (For example, if you have a timing
be
28 matches
Mail list logo