Debian Codegraph @

examples/rm.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5 )
6
7 type RmCommand struct {
8 Force bool `short:"f" long:"force" description:"Force removal of files"`
9 }
10
11 var rmCommand RmCommand
12
13 func (x *RmCommand) Execute(args []string) error {
14 fmt.Printf("Removing (force=%v): %#v\n", x.Force, args)
15 return nil
16 }
17
18 func init() {
19 parser.AddCommand("rm",
20 "Remove a file",
21 "The rm command removes a file to the repository. Use -f to force removal of files.",
22 &rmCommand)
23 }