Problem building on Windows 64 bit

52 views
Skip to first unread message

Kolya Krece

unread,
Jan 10, 2016, 12:12:08 AM1/10/16
to skicka-users
I am trying to build this tool on windows 64bit and am running into an error:

$ go get github.com/google/skicka
# github.com/cheggaaa/pb
src
\github.com\cheggaaa\pb\pb_win.go:9: undefined: os in os.Stdin

Anyone have any ideas as to what is going on. The source code for src\github.com\cheggaaa\pb\pb_win.go looks like this:


// +build windows

package pb

import (
   
"github.com/olekukonko/ts"
)

var tty = os.Stdin

func terminalWidth
() (int, error) {
    size
, err := ts.GetSize()
   
return size.Col(), err
}

I tried adding a package main declaration just before the package pb but that did not work.


Kolya Krece

unread,
Jan 10, 2016, 12:28:40 AM1/10/16
to skicka-users
I got this working by changing src\github.com\cheggaaa\pb\pb_win.go  - the import section becomes:

import (
   
"os"
   
"github.com/olekukonko/ts"
)

After this change I was able to build skicka.exe and it could do the ls command properly. If I notice any more problems related to this I'll update this post.

Matt Pharr

unread,
Jan 11, 2016, 11:30:11 AM1/11/16
to Kolya Krece, skicka-users
Great! I went ahead and submitted a pull request back to the developer of pb to fix this (https://github.com/cheggaaa/pb/pull/57); hopefully it will be merged there soon!

Thanks,
Matt


--
You received this message because you are subscribed to the Google Groups "skicka-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skicka-users...@googlegroups.com.
To post to this group, send email to skicka...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skicka-users/02cccf70-4329-4994-8bb9-99d8ed809142%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages