Hi, all
I have a C# code to decrypt data as following
public static string test(string input, string key)
{
if (((input == null) || string.IsNullOrEmpty(input.Trim())) ||
((input == "false") || (input == "null")))
{
return string.Empty;
This would probably introduce unnecessary confusion. People are used to the
equality operator comparing values in go, as opposed to references. It's
much better if the slices finally support the equality operator, even
though the comparison speed will depend on the number of items in the
slices
I want a single instance of a client handle to be initialized.
Is it ok to declare the instance as
var client MetricsClient
and then initialize it using sync.Once().
Is it required for some reason that the client be a pointer or are there
are other issues with it. My requirement is to be able
numBytes, err := downloader.Download(os.Stdout, &s3.GetObjectInput{ ... })
Should do it.
On Thursday, 30 June 2016 13:53:31 UTC+10, Joshua Boelter wrote:
>
> I've been tinkering w/ the AWS Go SDK to get used to it ... this is one
> method using the GetObject API; see the full gist for a working
I've been tinkering w/ the AWS Go SDK to get used to it ... this is one
method using the GetObject API; see the full gist for a working example
https://gist.github.com/jboelter/6f5bd598673eb0e606f10660495fc175
s3Svc := s3.New(awsSession)
result, err := s3Svc.GetObject(&s3.GetObjectInput{
Bucke
On Tue, Jun 28, 2016 at 2:50 PM, Martynas Pumputis wrote:
>
> Recently I've bumped into a problem when using the Linux network
> namespaces in Go.
>
> In my program I have the following function:
>
> func do() {
> runtime.LockOSThread()
> defer runtime.UnlockOSThread()
> netns.Set(cont
Thanks! I'll study these examples and see how they apply. I generally don't
use such big numbers, however, I may break it over sets of numbers which
could distribute the work more evenly.
On Wed, Jun 29, 2016 at 12:31 PM, Michael Jones
wrote:
> Try these versions: https://play.golang.org/p/HF6k0
Hi all,
I am new to go language.
Now I am trying to develop a GUI tool with go.
Are there any good choices such as QT or others to make the GUI
Thanks
wp
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop re
On Wed, Jun 29, 2016 at 9:52 AM, Inspectre Gadget wrote:
> Hey everyone,
>
> Here’s my issue, I will try to keep this short and concise:
>
> I have written a program that will accept a URL, spider that URL’s domain
> and scheme (http/https), and return back all input fields found throughout
> to t
On Wed, Jun 29, 2016 at 1:28 PM, Tathagata wrote:
>
> I'm measuring the context switch overhead for go routines and I have a
> question regarding the netpoller mechanism. I read online that the netpoller
> lives in its own thread, and responds to IO events. I thought this meant
> that there's a se
On Wed, Jun 29, 2016 at 11:19 AM, Chad wrote:
>
> Just been thinking that since a slice is a "reference" type, why not allow
> slice equality?
> Of course the number of cases where two slices are equal would be quite low,
> irrelevant of whether the view they have on their respective arrays is the
Look at the simple decoder in encoding/gob/debug.go.
-rob
On Wed, Jun 29, 2016 at 5:07 PM, Alex Flint wrote:
> Sorry to keep bothering you folks with this but does anybody have an
> answer to this?
>
> On Tue, Jun 21, 2016 at 9:26 AM Alex Flint wrote:
>
>> Oh I expected that since I only call
Sorry to keep bothering you folks with this but does anybody have an answer
to this?
On Tue, Jun 21, 2016 at 9:26 AM Alex Flint wrote:
> Oh I expected that since I only called encoder.Encode once, there would
> only be on repetition of the outermost segment. I was expecting the
> wireType to be
On Wed, 2016-06-29 at 11:19 -0700, Chad wrote:
> Just been thinking that since a slice is a "reference" type, why not
> allow
> slice equality?
> Of course the number of cases where two slices are equal would be
> quite
> low, irrelevant of whether the view they have on their respective
> arrays
Try using os.Stdout as the download target.
--
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 options, visit htt
Hello all,
I'm measuring the context switch overhead for go routines and I have a
question regarding the netpoller mechanism. I read online that the
netpoller lives in its own thread, and responds to IO events. I thought
this meant that there's a separate machine thread that keeps polling the
Hey everyone,
Here’s my issue, I will try to keep this short and concise:
I have written a program that will accept a URL, spider that URL’s domain
and scheme (http/https), and return back all input fields found throughout
to the console. The purpose is largely for web application security
Hello all.
Im new using AWS SDK in go and Im need download file object from S3 to
Stdout and not create a file.
For example:
my_download_s3_program > file.txt
or
my_download_s3_program | tar
etc
So, I can download to file, but I need stream on the fly to stdout, it's
possible?
This example wri
On Wednesday, 29 June 2016 15:24:41 UTC-6, Shawn Milochik wrote:
>
> I'm thinking about something like this:
>
> https://play.golang.org/p/Aq8US0M-Fe
>
> I just used Stringer, but you could of course just create your own
> interface with a function you find useful instead.
>
>
Shaw,
Thanks for
I'm thinking about something like this:
https://play.golang.org/p/Aq8US0M-Fe
I just used Stringer, but you could of course just create your own
interface with a function you find useful instead.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
T
Shawn,
Thanks, I'll have to see how I can make that interface. Thanks for the
guidance.
On 29 June 2016 at 13:42, Shawn Milochik wrote:
> You're welcome. I think that using empty interfaces isn't the best way to
> do it. I meant (but didn't specify) that you should make an interface that
> both
So that it becomes valid map inputs.
What should be hashed would be the slice/map/ref type value.
On Wednesday, June 29, 2016 at 8:38:03 PM UTC+2, Konstantin Khomoutov wrote:
>
> On Wed, 29 Jun 2016 11:20:46 -0700 (PDT)
> Chad > wrote:
>
> > And actually the same for any other similar types such
You're welcome. I think that using empty interfaces isn't the best way to
do it. I meant (but didn't specify) that you should make an interface that
both of your struct types satisfy, and return those instead.
--
You received this message because you are subscribed to the Google Groups
"golang-n
Shawn,
Thanks, it was an error on my side. The function actually returns an array
of structs but an interface is not an array, so when I tried to return an
array of interfaces, it crashed. I changed it from []interface{} to
interface{} and it's working.
Thanks for the help.
On Tuesday, 28 Jun
On Wed, 29 Jun 2016 11:20:46 -0700 (PDT)
Chad wrote:
> And actually the same for any other similar types such as maps...
>
>
> On Wednesday, June 29, 2016 at 8:19:45 PM UTC+2, Chad wrote:
> >
> > Just been thinking that since a slice is a "reference" type, why
> > not allow slice equality?
> >
And actually the same for any other similar types such as maps...
On Wednesday, June 29, 2016 at 8:19:45 PM UTC+2, Chad wrote:
>
> Just been thinking that since a slice is a "reference" type, why not allow
> slice equality?
> Of course the number of cases where two slices are equal would be quit
Just been thinking that since a slice is a "reference" type, why not allow
slice equality?
Of course the number of cases where two slices are equal would be quite
low, irrelevant of whether the view they have on their respective arrays is
the same.
I'm thinking about something analogous to comp
Try these versions: https://play.golang.org/p/HF6k0ovyoW
Changes:
1. Numbers big enough that the multiplies take some time.
2. Two styles of synchronization and work distribution.
Best case in this configuration is 3.9151x speedup on 4 core notebook:
$ go test -bench=.
testing: warning: no tes
Just guessing, but these solutions come to mind. Here's some pseudocode for
what I think Tamás was trying to say...
var x sync.Mutex
for {
sleep(24 hours)
x.Lock()
write/start a new daily log
x.Unlock()
}
or get a delay by selecting on a channel something like this
select {
case <-time.After
The suggestions of generics discussed here and in the referenced
documentation, will it be possible to compile the "Go-with-generics"
language into some idiomatic Go and compile it with the standard compiler?
(I guess *what* idiomatic means is the real question here..). Or would it
break idioma
Aram:
Ok, Thanks.
--
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 options, visit https://groups.google.com/d/o
On Wed, Jun 29, 2016 at 3:28 PM, Jingguo Yao wrote:
> Could you point out where you find the format information?
As far as I know, it is not formally documented anywhere (and can
change at any time).
--
Aram Hăvărneanu
--
You received this message because you are subscribed to the Google Grou
Aram:
Thanks for your reply. Could you point out where you find the format
information?
--
Jingguo
--
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+
On Wednesday, 29 June 2016 14:45:09 UTC+3, Sean Russell wrote:
>
> On Wednesday, June 29, 2016 at 2:31:59 AM UTC-4, Egon wrote:
>>
>> Just to be clear what I consider a *great example* for analyzing
>> generics:
>>
>> 2. 3+ real-world packages/applications use that package
>> * By real-world her
> What is the meaning of +0x2d following the line number?
The address of the assembly instruction relative to the start of the function.
> And what is the meanings of the numbers in
> Commit(0xc8201a86e0, 0x0, 0x0)?
Those are the function arguments.
--
Aram Hăvărneanu
--
You received this me
On Wednesday, June 29, 2016 at 2:31:59 AM UTC-4, Egon wrote:
>
> Just to be clear what I consider a *great example* for analyzing generics:
>
> 2. 3+ real-world packages/applications use that package
> * By real-world here I mean it wasn't written for learning or fun, but
> rather solving a conc
Can you say it in more detail?
Thinks.
在 2016年6月28日星期二 UTC+8下午12:23:28,Tamás Gulácsi写道:
>
> Don't Stat on every log line, but use some other mechanism (mutex,
> channel) to rotate the logs every day.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" gro
37 matches
Mail list logo