[go-nuts] Cron job (2nd monday of every month/ 3rd tuesday of every month)

2016-08-11 Thread kumargv
Hello guys, i am using this cron pkg https://godoc.org/github.com/robfig/cron what i am trying to achieve here is 1) run a job on 2nd friday of every month 2)run a job on 4nd sunday of every month 3)run a job on 1 monday of every month etc Please suggest thanks -- You received

[go-nuts] How to statically linking library in GO

2016-07-14 Thread kumargv
This is the Link of program what i am compiling https://play.golang.org/p/drJGhsWiEi when i am using- go build program.go ,it generating ->program(binary) file ./program program: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter

Re: [go-nuts] Segmentaion fault / static binary

2016-07-18 Thread kumargv
create a binary with all dependence ,so that it can run on any m/c without any problem Can you suggest something Thanks for trying. On Monday, July 18, 2016 at 5:55:37 PM UTC+5:30, kumargv wrote: > > go 1.6.2 > OS 16.04 LTS ubuntu > On Monday, July 18, 2016 at 5:25:21 PM UTC+5:30, Peter

Re: [go-nuts] Segmentaion fault / static binary

2016-07-18 Thread kumargv
go 1.6.2 OS 16.04 LTS ubuntu On Monday, July 18, 2016 at 5:25:21 PM UTC+5:30, Peter Waller wrote: > > I just tested this here on amd64 with go1.7rc1, and it works fine with no > crash, so I don't know why it is crashing for you. > > What version of go are you using? > -- You received this

[go-nuts] Segmentaion fault / static binary

2016-07-18 Thread kumargv
This is the Link of program what i am compiling https://play.golang.org/p/drJGhsWiEi when i am using- go build program.go ,it generating ->program(binary) file ./program program: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter

[go-nuts] Sqlite Compile error in windows.

2016-07-06 Thread kumargv
hello guys, i am trying to download this pkg go get github.com/xeodou/go-sqlcipher I am using TDM-GCC C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcrypto collect2.exe: error: ld returned 1 exit status I tried every possible

[go-nuts] Re: How to write Window API in GOLANG

2016-09-01 Thread kumargv
:30, kumargv wrote: > > Hello friends, > > i am trying to write some win api in golang ,because these API not > implemented any PKG. > > "syscall" > > "github.com/contester/runlib/win32" > > "golang.org/x/sys/windows" > >

[go-nuts] HOW To Write Windows API in GOLANG

2016-09-02 Thread kumargv
Hello friends, i am trying to write some win api in golang ,because these API not implemented any PKG. "syscall" "github.com/contester/runlib/win32" "golang.org/x/sys/windows" API are code in C++ OpenDesktop hdesk = OpenDesktop( _T("default"), // the

[go-nuts] Re: How to get Network speed in linux using golang

2016-09-08 Thread kumargv
;eth0\x00")// interface name eth0,eth1,wlan0 etc. sp := C.get_interface_speed((*C.char)(unsafe.Pointer([0]))) fmt.Println(sp) } Please give some suggestion . On Monday, March 28, 2016 at 5:21:59 PM UTC+5:30, kumargv wrote: > > i am able to get new_inbytes,prev_inbytes,new_outbytes,

[go-nuts] Unable to Get SID in golang

2016-08-31 Thread kumargv
I am getting SID of my system using WMI >wmic useraccount where name='vijay' get sid SID S-1-5-21-742204146-2006990925-2362806598-1001 But still i am not able to get sid structure . package main import ( "fmt" "golang.org/x/sys/windows" ) func main() { sid , domain, accType , err :=

[go-nuts] How to implement this In golang

2016-09-19 Thread kumargv
cursor = conn.cursor(MySQLdb.cursors.DictCursor) cursor.execute('SHOW SLAVE STATUS') result = cursor.fetchone() cursor.close() I am unable to Impement this in golang Please suggest -- You received this message because you are subscribed to the Google Groups

[go-nuts] How to implement In Golang

2016-09-19 Thread kumargv
import MySQLdb conn = MySQLdb.Connect( host='localhost', user='user', passwd='secret', db='test') cursor = conn.cursor() cursor.execute("SELECT this,that FROM foobar") rows = cursor.fetchall() cursor.close() conn.close() I am unable to Implement The above code in golang Please suggest

[go-nuts] How to impelment this Golang

2016-09-19 Thread kumargv
import MySQLdb import MySQLdb.cursors conn = MySQLdb.Connect( host='localhost', user='user', passwd='secret', db='test') cursor = conn.cursor(cursorclass=MySQLdb.cursors.DictCursor) cursor.execute("SELECT this,that FROM foobar") rows = cursor.fetchall() for row in rows: print

[go-nuts] TO Run Script/command as user in windows

2016-08-24 Thread kumargv
package main import ( "fmt" "github.com/contester/runlib/win32" "syscall" "unsafe" ) var PATH string = "C:\\Program Files (x86)\\Vistara\\Agent\\utils\\1.exe" var kernel32 = syscall.NewLazyDLL("kernel32.dll") var procCreatePipe = kernel32.NewProc("CreatePipe") func main() { var

[go-nuts] Re: CGO: How to link static library across dependent packages?

2016-10-29 Thread kumargv
Hi Mate, why Don't you try to make a static binary go build --ldflags ' -extldflags "-static"' filename.go On Thursday, October 27, 2016 at 8:10:55 PM UTC+5:30, pat.s...@gmail.com wrote: > > Folks, > > Two of my packages have dependency on the same C library. I have linked > them

[go-nuts] TCP DialTimeout Not Working Stuck for Hours.

2016-12-21 Thread kumargv
Hi, I was trying to connect with DialTimeout as: address:= "127.0.0.1:5" address:= "127.0.0.1:7432" conn, err := net.DialTimeout("tcp", address, time.Duration(30)*time.Second) if err != nil { fmt.Println("error in conn : ",err) return nil, err } My program Stuck in Net.DialTimeout I am

[go-nuts] Re: TCP DialTimeout Not Working Stuck for Hours.

2016-12-21 Thread kumargv
GO 1.7 centos 7.2.1511 On Thursday, December 22, 2016 at 12:35:44 PM UTC+5:30, Dave Cheney wrote: > > Can you please give a few more details. Which version of Go, which > operating system, that kind of thing. -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: TCP DialTimeout Not Working Stuck for Hours.

2016-12-22 Thread kumargv
e a small runnable code sample that demonstrates the > problem. > > On Thursday, 22 December 2016 18:13:14 UTC+11, kumargv wrote: >> >> GO 1.7 >> centos 7.2.1511 >> >> On Thursday, December 22, 2016 at 12:35:44 PM UTC+5:30, Dave Cheney wrote: >>> >>

[go-nuts] Re: Unmarshalling JSON from MongoDB serverStatus in Go - how to handle nesting, and easy retrieval?

2017-03-20 Thread kumargv
hi , I am also having the same problem, can you please elaborate invalid operation: dat["connections"]["current"] (type interface {} does not support indexing) Thanks On Friday, August 21, 2015 at 4:22:22 PM UTC+5:30, Giulio Iotti wrote: > > On Friday, August 21, 2015 at 11:51:32 AM UTC+2,

[go-nuts] Re: RedisDB (Redis server version 2.2.12) Unable to get Cluster Info

2017-08-28 Thread kumargv
OS UBUNTU 12.04 32 bit GOLANG 1.9 On Monday, August 28, 2017 at 11:55:02 AM UTC+5:30, Vijay Kumar Giri wrote: > > package main > > > import ( > > "fmt" > > > "github.com/go-redis/redis" > > ) > > > func main() { > > > client := redis.NewClient({ > > Addr:

[go-nuts] MongoDB + Golang + Get Shards Count + Get Chunks Count

2018-02-20 Thread kumargv
HI GUYS , if pymongo.version >= "3.2.2": mongos_conn = pymongo.MongoClient(host, port) else: mongos_conn = pymongo.Connection(host, port) chunks_count= mongos_conn.config.chunks.count()#rs.conf() shards_count= mongos_conn.config.shards.count()#rs.conf()