Live data from Hacker News

Awless: A Mighty CLI for AWS

github.com

31–40 of 120 posts

Re: Awless: A Mighty CLI for AWS

#31
post #17

Sorry for off-topic question, but is this considered good golang code ? https://github.com/wallix/awless/blob/master/stats/stats.go I'm considering learning go but amount of 'return err' and 'return nil, 0, err' is instant turn-off. Is this best-practice error handling in go ? Thanks !

It's the bane of Go code.

If you want to write it safely, you will have `if err != nil` everywhere.

This is normal and expected.

Re: Awless: A Mighty CLI for AWS

#32

Earlier quoted context omitted.

That "bitching" is both constructive criticism and helpful to highlight here in the comments so others may take note.

Maybe you're right and I'm being unfair. It just seems kind of dick-ish - what's wrong with even "Cool, but I don't like stats being collected, please make this opt in"?

That's how I interpreted the OP.

Re: Awless: A Mighty CLI for AWS

#35
How about some instructions on building it ?

It lacks a Makefile or any documentation in the tarball for the latest release (v0.0.13)...

I found some sparse documentation on the wiki, but that appears to fail. I tried: GOPATH=$(pwd) go build .

And got: $ GOPATH=$(pwd) go build . main.go:19:8: cannot find package "github.com/wallix/awless/commands" in any of: /usr/src/github.com/wallix/awless/commands (from $GOROOT) /home/rkeene/Downloads/awless-0.0.13/src/github.com/wallix/awless/commands (from $GOPATH)

Re: Awless: A Mighty CLI for AWS

#36
post #17

Sorry for off-topic question, but is this considered good golang code ? https://github.com/wallix/awless/blob/master/stats/stats.go I'm considering learning go but amount of 'return err' and 'return nil, 0, err' is instant turn-off. Is this best-practice error handling in go ? Thanks !

Unfortunately, yes.

The best phrasing I've heard recently is "Go is useful drudgery".

Re: Awless: A Mighty CLI for AWS

#38
post #13

> We also collect a few anonymous data (CLI errors, most frequently used commands and count of resources). Looks cool, but this is an instant no for me. Sorry guys.

Project creator here (but obviously not the OP). Yes, we do collect minimal anonymised statistics in the sole goal of improving awless. All the statistics code is here: https://github.com/wallix/awless/blob/master/stats/stats.go As the project is Apache licensed, you're free to modify it if you don't want this. Also, if you're conscious about privacy you should use application firewalls on your client side like Littl…

A toggle at least would be nice to turn all data collection off.

Re: Awless: A Mighty CLI for AWS

#39
post #23

> We also collect a few anonymous data (CLI errors, most frequently used commands and count of resources). Looks cool, but this is an instant no for me. Sorry guys.

Also upload the a hash of the userid and accountid. Hashed with non-random salt so it's not really anonymous as the function says. userid and accountid stored in database here: https://github.com/wallix/awless/blob/e2bf4f2cad37b011c5b3b6... retrieved by stats here: https://github.com/wallix/awless/blob/e2bf4f2cad37b011c5b3b6... Added to stats payload here: https://github.com/wallix/awless/blob/e2bf4f2cad37b011c5b3b6.…

(I'm one of the core developpers of awless)

The hash functions are totally unrevertable, so it is impossible to come back to the original identifiers.

We added these anonymous ids, in order to know which commands are the most used per users.

Anyway, if you have better ideas on how to manage this, feel free to make a pull request or create a Github issue. And if you prefer to disable it, you can also do it easily with the source code (you just need to comment a few lines).

Edit: We opened an issue for this topic on our Github repo: https://github.com/wallix/awless/issues/38 . Feel free to continue the discussion there.

Re: Awless: A Mighty CLI for AWS

#40
post #35

How about some instructions on building it ? It lacks a Makefile or any documentation in the tarball for the latest release (v0.0.13)... I found some sparse documentation on the wiki, but that appears to fail. I tried: GOPATH=$(pwd) go build . And got: $ GOPATH=$(pwd) go build . main.go:19:8: cannot find package "github.com/wallix/awless/commands" in any of: /usr/src/github.com/wallix/awless/commands (from $GOROOT) /…

It seems your GOPATH is not set correctly. First freshly install Go independently. Verify it is installed correctly with "go env".

Then do a "go get github.com/wallix/awless", "cd $GOPATH/src/github.com/wallix/awless" and "go install".

Then in the same prompt do "awless"

Post reply on HN