fgeller / kt

Kafka command line tool that likes JSON
MIT License
950 stars 100 forks source link

fix build failure on Windows #64

Closed mkokho closed 7 years ago

mkokho commented 7 years ago

Hey Felix :) Small fix for the tool, maybe some Windows users exist out there.

error was: .\common.go:75: cannot use syscall.Stdout (type syscall.Handle) as type int in argument to terminal.IsTerminal

found solution here: https://github.com/golang/go/issues/12978#issuecomment-149035393

tested both terminal and non terminal :)

$ ./kt consume -pretty -topic WordsWithCountsTopic { "partition": 0, "offset": 0, "key": "", "value": "1" } $ ./kt consume -pretty -topic WordsWithCountsTopic > x $ cat x {"partition":0,"offset":0,"key":"","value":"1"}

fgeller commented 7 years ago

hey misha! :)

what a weird case - thanks for looking into it and providing a solution!