On Wednesday, July 29, 2020 at 7:23:22 PM UTC+10, mb0 wrote:
>
> This is a special kind of switch called a type switch. You can read more
> about it in the language specification where its part of the intrinsic
> go syntax. https://golang.org/ref/spec#Switch_statements
>
> Because it is a
Hrm, that bpaste site will only last a week, so, for posterity, I'll paste
the script here
#!/bin/bash if [[ "$#" -ne 1 ]]; then echo "No filename supplied, nothing
to do" exit 0 fi INFILE="$1" echo "=== In file
===" cat $INFILE echo
Thanks, I have a bash script that I use to examine the assembly code that
is generated by a given go file
https://bpa.st/MRJ4IWJFJ5YNHXFLCMMYGGSI3A
But that takes me past the code that was used to generate that assembly
I'm wanting the midpoint here, the code that the compiler sees, in order
Hi all, I'm trying to understand what *exactly* the .(type) is doing in the
following statement
switch foo := bar.(type)
I mean, I get that foo is being assigned a type converted version of the
bar interface, but, I want to see what exactly they .(type) call does.
I have
found
small example of when it does happen?
>
> //jb
>
> On 6 Apr 2020, at 08:03, Shane H > wrote:
>
> I know that it's documented that the json encoder will produce base64 "Array
> and slice values encode as JSON arrays, except that []byte encodes as a
> base64-encoded st
I know that it's documented that the json encoder will produce base64 "Array
and slice values encode as JSON arrays, except that []byte encodes as a
base64-encoded string", but I am getting a base64 response when I pass in a
string
response := []string
response = append(response,
On Monday, March 23, 2020 at 2:49:46 PM UTC+11, Ian Lance Taylor wrote:
>
> On Sun, Mar 22, 2020 at 7:10 PM Shane H >
> wrote:
> >
> > I'm a lot confused by the behaviour of some tests I have at the moment,
> they're skipping.. when there's no skip or timeout or...
I'm a lot confused by the behaviour of some tests I have at the moment,
they're skipping.. when there's no skip or timeout or... anything that I
can see
I know this is going to be difficult because I don't have code I can paste
to show what's happening
I'm using go1.13.9, but this behaviour
On Sunday, January 26, 2020 at 1:49:15 PM UTC+11, Shane H wrote:
>
> Hi all, I'm trying to learn how to write a linter (because long weekend,
> etc)
>
> I looked at Fatih's very fine blog post (
> https://arslan.io/2019/06/13/using-go-analysis-to-write-a-custom-linter/)
&g
Hi all, I'm trying to learn how to write a linter (because long weekend,
etc)
I looked at Fatih's very fine blog post (
https://arslan.io/2019/06/13/using-go-analysis-to-write-a-custom-linter/)
as well as the one that precedes it, although I was a LOT lost reading that
one.
Copying and
On Saturday, December 28, 2019 at 5:23:27 AM UTC+11, Ignacio Grande wrote:
>
> Hi!
>
> I have an application I made a few years ago for a friend which sends
> emails using a Gmail account with STMP, using the library
> gopkg.in/gomail.v1. Since then I moved on and I'm not familiar with
>
On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote:
>
>
>
> This is what I usually do in these situations:
>
> var amqpDial=amqp.Dial
> func (mq *MQ) Connect() (err error) {
> ...
>mq.conn, err = amqpDial(mq.URI)
> ...
> }
>
> func TestConnect(t *testing.T) {
I'm trying to unit test some code (pasted below). I've struggled to find a
way to mock the amqp.Connection, so have decided to go the monkey patching
route.
The test 'works' but only if I use the following incantation
go test -gcflags=-l
So, my next step is to ensure that -gcflags is set to
On a whim I thought I'd see how the linters felt about the go src code, the
current results for go 1.12.10 are below.
In the result you will note that I am unable to compile go because a file
is missing (libtestgo2c2go.h). I cannot find it on my system, nor can I
find it on the internet.
The
>
>
> This looks like you unpacked a Go distribution into a directory that
> already held another Go distribution. Always unpack a Go distribution
> into an empty directory.
>
> Ian
>
You could well be right, I think (from my perspective) the bigger issue is
managing a Go installation on
On Tuesday, August 6, 2019 at 11:31:40 AM UTC+10, Shane H wrote:
>
>
>
> On Tuesday, August 6, 2019 at 10:56:42 AM UTC+10, Shane H wrote:
>>
>> Hi all,
>>
>> I've done a bit of searching, and asked around, but not found an answer
>> to my (most likely
On Tuesday, August 6, 2019 at 10:56:42 AM UTC+10, Shane H wrote:
>
> Hi all,
>
> I've done a bit of searching, and asked around, but not found an answer to
> my (most likely self-inflicted) problem.
>
> I have been coding with Go 1.10 and 1.11 for a whiles, but I decide
Hi all,
I've done a bit of searching, and asked around, but not found an answer to
my (most likely self-inflicted) problem.
I have been coding with Go 1.10 and 1.11 for a whiles, but I decided that
it was time to join the future and upgraded to 1.12. It worked fine for the
project I was
18 matches
Mail list logo