Re: [go-nuts] Linter for checking 'MVS' of go module

2020-12-08 Thread Mhd Shulhan
On Wed, 9 Dec 2020, 11:42 xiangdong...@gmail.com, wrote: > Hi all, > > I'm wondering if any linter, or is it practical to make one, checks > whether a go module's code change conforms the minimal version selection > rules, say linter warns a v2 is needed if incompatible changes to APIs are >

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Mhd Shulhan
Pada tanggal Sab, 12 Sep 2020 08.52, Siddhesh Divekar < siddhesh.dive...@gmail.com> menulis: > In writing to a file option, we would periodically write the file as it > might turn out to be a huge file > for the entire life of the pod to flush at once > Maybe, the obvious solution here is not

Re: [go-nuts] writing to net.Conn tcp socket

2020-09-11 Thread Mhd Shulhan
Pada tanggal Sab, 12 Sep 2020 02.54, Andy Hall menulis: > if I have multiple clients connected to a tcp server and I wish to write > back to specific connections I can record the net.Conn value and then use > the Write method on it...but when using Println I get the following for two >

Re: [go-nuts] How to handle large amount of data on the frontend using go template and cassandraDB?

2020-08-13 Thread Mhd Shulhan
Pada tanggal Kam, 13 Agu 2020 23.21, menulis: > > https://stackoverflow.com/questions/63393803/how-to-handle-large-amount-of-data-on-the-frontend-using-go-template-and-cassand?noredirect=1#comment112097067_63393803 > > I am using *golang* to load data from CassandraDB and send it to the view >

Re: [go-nuts] Odd error message - expression in go must be function call

2020-04-23 Thread Mhd Shulhan
Pada tanggal Kam, 23 Apr 2020 21.30, Matthew Zimmerman menulis: > I was really confused by this error for ~10 minutes or so. Usually when > this happens to me, I missed a closing/opening brace somewhere or I forgot > to add () after my anonymous function declaration to actually run it. > > This

[go-nuts] Re: go tip: random high CPU usage on VirtualBox

2020-03-14 Thread Mhd Shulhan
Pada tanggal Sab, 14 Mar 2020 06.15, Ian Lance Taylor menulis: > On Fri, Mar 13, 2020 at 1:05 AM Mhd Shulhan wrote: > > > > > > > > > On 12 Mar 2020, at 13.13, Mhd Shulhan wrote: > > > > > > > > >> My question is any one have id

[go-nuts] Re: go tip: random high CPU usage on VirtualBox

2020-03-13 Thread Mhd Shulhan
> On 12 Mar 2020, at 13.13, Mhd Shulhan wrote: > > >> My question is any one have idea how to debug this so I can provide more >> detailed report? >> >> Thank you in advance. > > So, I try to debug with gdb 9.1. Here is the sample of stack when t

[go-nuts] Re: go tip: random high CPU usage on VirtualBox

2020-03-12 Thread Mhd Shulhan
> My question is any one have idea how to debug this so I can provide more > detailed report? > > Thank you in advance. So, I try to debug with gdb 9.1. Here is the sample of stack when the CPU got high, ... [New LWP 1885] [New LWP 1886] [New LWP 1887] [New LWP 1888] [New LWP 1889] ^C

[go-nuts] go tip: random high CPU usage on VirtualBox

2020-03-10 Thread Mhd Shulhan
Hi all, I have Go tip fetch and build every once or more in a week on my local development (office environment). For local testing, I have VirtualBox setup with all third parties. The host machine is macOS Catalina version 10.15.3, Model Identifier: MacBookPro14,1 Processor Name:

Re: [go-nuts] Language proposal: labelled "with" statements to help make test code easier to write

2020-02-29 Thread Mhd Shulhan
Pada tanggal Min, 1 Mar 2020 01.11, Warren Stephens < wsteph...@prognoshealth.com> menulis: > I often write a function or module to handle some process that takes 3 or > 4 steps to complete. > > After I am happy with the code I then proceed to write tests for the code, > but find that I am

[go-nuts] [Proposal] database/sql: add interface that unite DB and Tx

2020-01-15 Thread Mhd Shulhan
## Problem At some point we have a function that receive an instance of database connection to query rows in specific table. Let's say that function F() accept DB that query table T. If function F() called with DB instance, it will query only rows that has been committed into database. IF

Re: [go-nuts] http: superfluous response.WriteHeader call

2019-11-01 Thread Mhd Shulhan
On Fri, 1 Nov 2019, 00:13 , wrote: > help me! > > web connect database and show view. when press f5 repeatedly > command line show http: superfluous response.WriteHeader > call... > My guess is that you call response.WriteHeader in your code. Check again, and make sure its only

Re: [go-nuts] How to kill running function from core golang libraries

2019-11-01 Thread Mhd Shulhan
On Fri, 1 Nov 2019, 21:07 burak sarac, wrote: > I have a go routine running something like 'hash.sum(data)' using import > "hash" that I want to terminate immediately in case of user wants to > kill, I can not send channel to notify. > I have not tried this, but you can use a combination of

Re: [go-nuts] How to mock functions in Go ?

2019-09-20 Thread Mhd Shulhan
On Fri, 20 Sep 2019, 18:58 Nitish Saboo, wrote: > Tried running you code, it's failing: > > --- FAIL: TestF (0.00s) > test.go:43: got ubuntu, want testing > FAIL > If that's the case I think you should learn about programming in general first, before learning how to mock a function. I

Re: [go-nuts] How to mock functions in Go ?

2019-09-20 Thread Mhd Shulhan
> On 20 Sep 2019, at 17.21, Nitish Saboo wrote: > > I have a function in Go that I want to unit test but that function contains > os.Hostname().Hence i thought of mocking os.Hostname. > > Example: > > func F(){ > hostname, _ := os.Hostname() > } > > I tried something like this: > > var

Re: [go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread Mhd Shulhan
In the following redis page: https://redis.io/clients#go you can see list of Go packages, the recommended ones are marked with star; while package with smile icon mark packages that have activities within last six months. -- You received this message because you are subscribed to the Google

Re: [go-nuts] Broken links on some blogs

2019-08-18 Thread Mhd Shulhan
On Sun, 18 Aug 2019, 06:04 Ian Lance Taylor, wrote: > On Tue, Aug 13, 2019 at 11:13 AM Shulhan wrote: > > > > I am not sure where or how to report this problem, but all of the links > > from the following blog > > > > https://blog.golang.org/upcoming-google-io-go-events > > > > are 404. Some

Re: [go-nuts] Some issues with UDP and Go

2019-04-06 Thread Mhd Shulhan
On Sun, 7 Apr 2019, 04:24 John Dreystadt, wrote: > I wrote some sample code (at the end of this message) to see how UDP > worked in the Go environment. And I wound up with some issues because > things did not seem to work as I expected. I am running go1.11.2 on both a > Windows box and a Ubuntu

Re: [go-nuts] How to write unit test for init()?

2018-11-26 Thread Mhd Shulhan
On Tue, 27 Nov 2018, 11:08 Vast Peng > > when importing *component*, Golang will call *init() *automatically. > One way to do it is by moving the init into another function and call it from init. That way you can create test for the function. > -- You received this message because you are

Re: [go-nuts] Modules + go get

2018-09-10 Thread Mhd Shulhan
On Mon, 10 Sep 2018, 16:00 Paul Jolly, wrote: > > GO111MODULE=off go get -u github.com/my/package > Last time I check, if GOPATH is unset and GO111MODULE is on it will download the source code to $HOME/go. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Why can't we use unicode? [Go2 Generics]

2018-09-06 Thread Mhd Shulhan
> > Why on earth keep on ascii? > > IPA: ʅ ʧ ʭ (0x285, 0x2a7, 0x2ad) > Latin-E: « » ¦ > Latin-A: Ħ ŧ Ŧ Ɏ > Latin-B: ǁ ǂ > Probably because its hard to type on most non ASCII keyboard. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] What am I missing here? FYI, I'm completely new to golang xD

2018-09-03 Thread Mhd Shulhan
On Mon, 3 Sep 2018, 13:03 'sebastian andersen' via golang-nuts, < golang-nuts@googlegroups.com> wrote: > This code want's me to believe that I have not declared any of the > variables that I am currently trying to declare: > > func deleteRow() { > db, err := sql.Open("mysql",

Re: [go-nuts] Listen by multiple goroutines via channels

2018-09-03 Thread Mhd Shulhan
On Mon, 3 Sep 2018, 13:03 , wrote: > I have a postgresql notification listener. > > And i have thousands of different goroutines. > > I am waiting to receive a single notification from each goroutine. > > > But only one channel is getting the value. Example: >

Re: [go-nuts] cannot assign 1 values to 2 variables [simple error handling]

2017-09-18 Thread Mhd Shulhan
On 18/09/17 10:00, Ângelo Chida wrote: Hi, I'm new in Golang but I'm PHP StackDev since 10 years ago I'm following this tutorial https://golang.org/doc/articles/wiki/ on how to build a web app, but I'm stuck on some error and can't find anywhere a solution. If you read down into "Data