klocctl

command module
v0.0.0-...-2cfc9ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 1 Imported by: 0

README

klocctl

[WIP!] Klocctl packages the Klocwork API into a more friendly CLI using the popular open-source Go libraries Cobra and Viper.

Build Status Go Report Card

Build:

make build

or

./klocctl go build -o ./klocctl main.go

Usage:

./klocctl -h

Contributing:

klocctl's CLI utlises the open-source spf13 projects cobra and viper, so documentation on extending its API can be readily learned there.

Extensions should follow the format defined well by cobra, i.e.:


Cobra is built on a structure of commands, arguments & flags.

Commands represent actions, Args are things and Flags are modifiers for those actions.

The best applications will read like sentences when used. Users will know how to use the application because they will natively understand how to use it.

The pattern to follow is APPNAME VERB NOUN --ADJECTIVE. or APPNAME COMMAND ARG --FLAG

A few good real world examples may better illustrate this point.

In the following example, 'server' is a command, and 'port' is a flag:

hugo server --port=1313

In this command we are telling Git to clone the url bare.

git clone URL --bare


Example Repo where Cobra and Viper is used well: https://github.com/jgsqware/clairctl/

Updating the .travis.yml for go: https://docs.travis-ci.com/user/languages/go/

Documentation

Overview

Copyright © 2019 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL