Skip to content

Latest commit

 

History

History
117 lines (81 loc) · 3.53 KB

README.adoc

File metadata and controls

117 lines (81 loc) · 3.53 KB
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

kn sample prints out a friendly message to the user.

Description

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.

Usage

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.

kn sample print

Print the argument

Usage:
  kn sample print [flags]

Flags:
  -h, --help   help for print

kn sample version

This command prints out the version of this plugin and all extra information which might help, for example when creating bug reports.

Prints the plugin version

Usage:
  kn sample version [flags]

Flags:
  -h, --help   help for version

Examples

Print out a beautiful message

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.

Example 1. Example Greeting
$ kn sample print Carl

Hello, Carl

Print out the version of this plugin

The kn sample version command helps you to identify the version of this plugin.

Example 2. Example version output
$ 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.