Important
|
This repository should be used as a blueprint for creating your own kn plugins. See the BLUEPRINT.md for how to kickstart your plugin. |
kn sample
prints out a friendly message to the user.
With this plugin, you can make the world a better place. Use it to greet your users with a friendly "Hello".
Also, and more important, this plugin serves as a blueprint for other plugins. So copy over the content of this directory into your new plugin and adapt it you your code. Including this README.
A longer description of this fantastic plugin that can go over several lines. Usage: kn sample [command] Available Commands: help Help about any command print Print the argument version Prints the plugin version Flags: -h, --help help for kn-hello Use "kn-sample [command] --help" for more information about a command.
Often you want to greet your users with a charming message.
In this case, you can use the kn sample print
command.
The only required argument here is the name of the person to greet.
$ kn sample print Carl Hello, Carl
The kn sample version
command helps you to identify the version of this plugin.
$ kn sample version Version: v20200402-local-a099aaf-dirty Build Date: 2020-04-02 18:16:20 Git Revision: a099aaf
As you can see it prints out the version, (or a generated timestamp when this plugin is built from a non-released commit) the date when the plugin has been built and the actual Git revision.