https://gist.github.com/elvarb/c680e52b83f069cc5e4cd2e8033999d3
Because the API has a rate limit it is better to generate an API key for this.
https://github.com/settings/tokens
Example output
encoding/hex
encoding/json
encoding/pem
errors
flag
fmt
github.com/BurntSushi/toml
-> License: MIT License
github.com/fsnotify/fsnotify
-> License: BSD 3-clause "New" or "Revised" License
github.com/hashicorp/hcl
-> License: Mozilla Public License 2.0
This really should be a go program or a feature in go list.
评论:
ChristophBerger:
noonexx:Nice!
The next iteration could be a re-write in Go (= cross-platform)... (Or does someone have a powershell-to-fish converter around?)
ChristophBerger:The newest PowerShell is cross-platform and afaik open source. The script above works just as well on my Linux installation.
Redundancy_:Wow, didn't know that. But it appears to be true...
Guess I'll have to check this out...
slantview:I think the question is why anyone would want to read or write powershell by choice. I've provisioned machines with it, but I really hate using it due to the way that it's more a shell script than a programming language (in error handling and string manipulation etc)
DudPug:Honestly, being written for go but using powershell is just kinda head scratching.
anxiousalpaca:It was just something I needed to do quickly and I'm still more proficient in powershell than in go.
Should be very easy to do in go though and might be something I do in the future.
sweet
