[go-nuts] Re: godoc memory leak

2019-06-17 Thread Agniva De Sarker
Couple of questions:

1. What version of godoc and Go are you using ? What is your go env ?

2. You are using -index but not passing an index file. Any reason for that 
? godoc will load faster if you write an index beforehand and pass that.

3. I am guessing since you have set index_interval, you expect files to be 
added in your GOPATH. How many new files are getting added while godoc is 
running ?

4. Please show us the output by adding -v flag.



On Tuesday, 18 June 2019 05:28:39 UTC+5:30, christo...@wework.com wrote:
>
> Hi all,
>
>
> I've been playing around with an internal godoc server and noticed that 
> over long periods of time the memory growth is unbounded. The command I use 
> to invoke godoc is *godoc -index=true -index_interval=15m 
> -index_throttle=.30 -maxresults=0*. The following images below track the 
> memory usage and change in memory usage over a 24 hour period on a 8 GiB 
> machine. I've also attached a pdf with the data points I gathered during 
> the experiment. Notice how the godoc process consumes 76% of memory by the 
> end of the experiment. Is this indicative of a memory leak in the godoc 
> source code or is this expected behavior?
>
>
> [image: Δ Mem Usage %.png][image: Mem Usage %.png]
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/60b70a8c-3a3d-49c6-b9dc-b2bd1053c435%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] godoc memory leak

2019-06-17 Thread christopher.dang via golang-nuts


Hi all,


I've been playing around with an internal godoc server and noticed that 
over long periods of time the memory growth is unbounded. The command I use 
to invoke godoc is *godoc -index=true -index_interval=15m 
-index_throttle=.30 -maxresults=0*. The following images below track the 
memory usage and change in memory usage over a 24 hour period on a 8 GiB 
machine. I've also attached a pdf with the data points I gathered during 
the experiment. Notice how the godoc process consumes 76% of memory by the 
end of the experiment. Is this indicative of a memory leak in the godoc 
source code or is this expected behavior?


[image: Δ Mem Usage %.png] [image: Mem Usage %.png]


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a8545a9d-3f77-4556-b4be-a075a6b126c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Godoc Web Service - Run 1.pdf
Description: Adobe PDF document


Re: [go-nuts] Go GTK vs QT for Linux

2019-06-17 Thread Tyler Compton
I haven't personally used this library, but I'd think you'd only
need libgtk-3-dev and libappindicator3-dev at compile-time. You should be
able to get away with the smaller runtime packages libgtk-3-dev
and libappindicator3-1 once your application is built.

On Mon, Jun 17, 2019 at 6:56 AM Subramanian Sridharan <
clawsonfir...@gmail.com> wrote:

> Hi guys
>
> I've been fiddling around this  package
> which uses GTK bindings in Go to achieve systray functionality.
> But it depends on *libgtk-3-dev *and* libappindicator3-dev *which amount
> to around 300 MB.
>
> Have you guys come across any other package that implements GTK or QT
> binding in Go?
>
> How do GTK and QT weight against each other with respect to Go?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/c9d629e6-4e09-4c1a-ac69-906cd259f2af%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu0PAiuSnoWysjmmgBV5_P3PK2HS1XdKJaXDiA3ufhFTtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Bugs on switch

2019-06-17 Thread Tyler Compton
Andrew is right, but I'll also add that if you really do want fallthrough
semantics, you can use the "fallthrough" keyword:
https://play.golang.com/p/x2gBb905Hj0

Go opts to make the somewhat uncommon case of fallthrough explicit, and the
more common "break" case implicit. A bit surprising for new Go programmers
but it does allow for most switch statements to be quite a bit less verbose.

On Mon, Jun 17, 2019 at 7:35 AM Andrew Klager 
wrote:

> I'm going to guess, based on the "break" statement in the final case, that
> you expect each of the case statements without a break to fall through to
> the nest case. Go does not work like that. By default, each case, whether
> there's any action taken or not, breaks. Take a look at this to accomplish
> what you're probably looking for: https://play.golang.org/p/0aXXjoshOk9
>
> On Mon, Jun 17, 2019 at 9:26 AM  wrote:
>
>> i write example code standard switch statement
>> https://play.golang.org/p/kOplHDBk8Df
>>
>> program exited without print something.
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/88c11740-e4a2-43af-8d4f-45c986cc55df%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CABn4WMUt%2BD30_OuKORFnMJL6okHYU5TVHKpX-rEqyyJ_Y15DKw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu3sj63znKC8YSo6FTnj3-UJPRoOuGqxvGUemCLo4pNjVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Scheduling - find the overlap size of two sequential date ranges and determine the actual dates of included in the intersection

2019-06-17 Thread Jan Mercl
On Sun, Jun 16, 2019 at 6:48 PM John More  wrote:

> I have created a program to solve this problem 
> (https://play.golang.org/p/BueQBahUUbk) but I am not a pro and do not know if 
> there is a better way.

Possibly useful: https://godoc.org/modernc.org/interval#example-Time

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-WEK8gdDRu79fj04eU8bk3ksugLpjN-1UpfGu-PCOAvwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: Scheduling - find the overlap size of two sequential date ranges and determine the actual dates of included in the intersection

2019-06-17 Thread jake6502
On Sunday, June 16, 2019 at 12:52:54 PM UTC-4, John More wrote:
>
> Updated playground code
> https://play.golang.org/p/qHufIG5ppww
>
> On Sunday, June 16, 2019 at 12:48:25 PM UTC-4, John More wrote:
>>
>> I have created a program to solve this problem (
>> https://play.golang.org/p/BueQBahUUbk) but I am not a pro and do not 
>> know if there is a better way. 
>>
>> Thanks for your time and a huge than You to Yudai the creator of "
>> github.com/yudai/golcs" . I have also attached the code.
>>
>>
>>  
A couple of comments. Without  actually doing the work myself, I would say 
there should be a number of ways to do this using simple date math. This 
should be made easier since you are only concerned with days and not times. 
Creating and walking slices may work, but it seems clumsy and certainly 
inefficient. Also, you code mixes together the code that creates the sample 
data with the actual work all in main().  Refactoring the code to contain a 
function that takes the 4 dates and returns the overlap, and then using 
that function in main, with the sample data, would make it easier to read, 
understand, and refactor. 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/cfd6bc73-fb14-4840-9d55-f7293e72bf3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Pointer Method Receiver

2019-06-17 Thread jake6502


On Sunday, June 16, 2019 at 5:29:49 PM UTC-4, andrey mirtchovski wrote:
>
> Hi Ali, 
>
> I understand your desire to provide useful information about Go in 
> blog posts. This is commendable. However let's try to keep this list 
> for technical issues and keep empty posts containing just a link to a 
> minimum. More signal, less noise. Is there a particular issue you'd 
> like to raise? Is there a particular item you'd like to address? Let's 
> talk about that. 
>
> There are plenty of aggregators that will cheerfully accept your link: 
> /r/golang, HN, slashdot. There people can vote whether a particular 
> item is of interest. Here, it's just a mailing list. The more noise, 
> the less people are willing to monitor it, and the less real issues 
> get addressed. 
>
> Sincerely, 
>
>
Not looking for a flame war, but I see this kind of post with some 
regularity in this group, usually with no complaints. I see how it could 
get out of hand, but at the current levels, I find these posts helpful, or 
at worst innocuous. So that's another perspective. Thanks Ali for the post. 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c5de9bf2-bbc4-41ad-a4f0-7906fe574b9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Bugs on switch

2019-06-17 Thread Andrew Klager
I'm going to guess, based on the "break" statement in the final case, that
you expect each of the case statements without a break to fall through to
the nest case. Go does not work like that. By default, each case, whether
there's any action taken or not, breaks. Take a look at this to accomplish
what you're probably looking for: https://play.golang.org/p/0aXXjoshOk9

On Mon, Jun 17, 2019 at 9:26 AM  wrote:

> i write example code standard switch statement
> https://play.golang.org/p/kOplHDBk8Df
>
> program exited without print something.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/88c11740-e4a2-43af-8d4f-45c986cc55df%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABn4WMUt%2BD30_OuKORFnMJL6okHYU5TVHKpX-rEqyyJ_Y15DKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Problems with Text Template

2019-06-17 Thread Yamil Bracho
Yes, Kurtis you are absolutely right!!!

I just typed in "template.ParseFiles" and my editor made the changes for me 
in the imports and it imported "html/template" and i di not check this...

Thanks!!!


El viernes, 14 de junio de 2019, 22:20:11 (UTC-5), Kurtis Rader escribió:
>
> It is very unlikely you are using text/template. At least I can't 
> reproduce the problem using text/template but can with html/template: 
> https://play.golang.org/p/elqHI1EtfFa. Or you are using text/template but 
> somewhere before executing that template your data is being converted to a 
> HTML friendly form.
>
> On Fri, Jun 14, 2019 at 6:28 PM Yamil Bracho  > wrote:
>
>> Yes, I am using text/template...
>>
>> El viernes, 14 de junio de 2019, 19:07:24 (UTC-4), Burak Serdar escribió:
>>>
>>>
>>> Are you using html/template by any chance? 
>>>
>>> If so, try text/template instead.
>>>
>>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/37ca7844-49d1-4ea9-91e7-4e1fe0ecc98c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Bugs on switch

2019-06-17 Thread luthfigearintellix
i write example code standard switch statement
https://play.golang.org/p/kOplHDBk8Df

program exited without print something.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/88c11740-e4a2-43af-8d4f-45c986cc55df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Go GTK vs QT for Linux

2019-06-17 Thread Subramanian Sridharan
Hi guys

I've been fiddling around this  package 
which uses GTK bindings in Go to achieve systray functionality.
But it depends on *libgtk-3-dev *and* libappindicator3-dev *which amount to 
around 300 MB.

Have you guys come across any other package that implements GTK or QT 
binding in Go?

How do GTK and QT weight against each other with respect to Go?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c9d629e6-4e09-4c1a-ac69-906cd259f2af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.