0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-13 23:30:40 +00:00
wp-plugin-go/urfave/doc.go
Thomas Boerger a20f13fdb0
Restructure the code accross more files
I have split the code into various files and beside that I have also
used more flat package structure. I have removed the whole constants for
flag names and environment variables, since nobody got to write these
flags manually anyway as all these variables are assigned to structs
all can benefit form code completion while this lib stays more readable.

Signed-off-by: Thomas Boerger <thomas@webhippie.de>
2019-12-21 21:55:01 +01:00

38 lines
1.1 KiB
Go

// Copyright (c) 2019, the Drone Plugins project authors.
// Please see the AUTHORS file for details. All rights reserved.
// Use of this source code is governed by an Apache 2.0 license that can be
// found in the LICENSE file.
// Package urfave provides helpers for interacting with the `urfave/cli`
// package when creating plugins for use by the Drone CI/CD service.
//
// Drone communicates to plugins by passing in environment variables that have
// information on the currently executing build. The `urfave/cli` package can
// read these environment variables and extract them into structs.
//
// import (
// "github.com/drone-plugins/drone-plugin-lib/urfave"
// "github.com/urfave/cli/v2"
// )
//
// func main() {
// app := cli.NewApp()
// app.Name = "plugin name"
// app.Action = run
// app.Flags = []cli.Flag{
// // All my plugin flags
// }
//
// app.Flags = append(
// app.Flags,
// urfave.Flags()...,
// )
// }
//
// func run(ctx *cli.Context) error {
// pipeline := urfave.FromContext(ctx)
// ...
// return nil
// }
package urfave