Comments (8)
Thanks for the tip @jhuggart, I'll look into that!
from vulcanizer.
This is a good idea! But unfortunately it doesn't look like it's supported by the https://github.com/spf13/cobra, the cli library that's we're using: spf13/cobra#248
from vulcanizer.
Hey @nickcanz, Good to see you in the wild. I stumbled across this from the cobra issue you referenced above.
I ended up using promptui with cobra to allow input for a handful of fields. It was super easy to wire up. Maybe it'll work for you too.
from vulcanizer.
I wrote up two implementations of this using https://github.com/manifoldco/promptui and Go's builtin golang.org/x/crypto/ssh/terminal terminal.ReadPassword()
.
manifoldco/promptui implementation
golang.org/x/crypto/ssh/terminal implementation
Binary sizes:
13544298 promptui-vulcanizer
13120932 terminal-vulcanizer
Promptui looks a bit flashier and will obviously open up other possibilities for interactive prompts that we might want in the future, but /x/crypto/ssh/terminal is a lot slimmer.
Promptui allows you to set limits on the password, which might not be interesting for this purpose, but it displays "*" instead of what you type, where as /x/crypto/ssh/terminal just shows nothing at all which can be confusing for some.
@jhuggart If you are still using Vulcanizer, could you check out one of my branches and try it out? I don't have a cluster with auth enabled handy right now so I can't validate if this actually works.
from vulcanizer.
@nickcanz or @jhuggart could you try this out with a password protected cluster?
from vulcanizer.
Sorry about this @leosunmo! Really appreciate your work and I'm going to dedicate some time next week to look at it.
from vulcanizer.
No worries Nick, not in a huge rush, I don't even use the feature. Just very keen to close the last two issues ;)
from vulcanizer.
I've used https://github.com/AlecAivazis/survey for various interactive prompts including masked password in a CLI that is built with Cobra.
from vulcanizer.
Related Issues (19)
- Integrate public CI server HOT 1
- Integrate linting to the project HOT 1
- Compatibility with Elasticsearch Domain hidden behind a Loadbalancer HOT 8
- Snapshot list show incorrect finished date while running a snapshot HOT 4
- allow setting username/password in yaml config HOT 1
- Integrate go-docs to build documentation HOT 1
- Panic during golangci-lint typecheck (cgo files)
- Diff mappings HOT 4
- Add an ability to set multiple hosts per cluster HOT 1
- Malformed http request HOT 3
- Passing authentication through Go API HOT 2
- Get index settings for "private" indices not working HOT 3
- Allow setting cluster settings to null HOT 6
- Get Disk Allocation information for Nodes HOT 2
- Release v0.5.2 HOT 3
- A link in this repo's readme points to a folder called "vendor" which does not (or no longer?) exists in this repo. Gives Status code [404:NotFound] HOT 1
- Provide pre built releases for the major platforms HOT 3
- AWS Elasticsearch Service Support - PR's Welcome? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulcanizer.