-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathblueprint.go
More file actions
39 lines (28 loc) · 905 Bytes
/
blueprint.go
File metadata and controls
39 lines (28 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"flag"
"fmt"
)
const defaultBlueprintRepo = "https://github.com/sourcegraph-community/blueprints"
var blueprintCommands commander
func init() {
usage := `INTERNAL USE ONLY: 'src blueprint' manages blueprints on a Sourcegraph instance.
Usage:
src blueprint command [command options]
The commands are:
list lists blueprints from a remote repository or local path
import imports blueprints from a remote repository or local path
Use "src blueprint [command] -h" for more information about a command.
`
flagset := flag.NewFlagSet("blueprint", flag.ExitOnError)
handler := func(args []string) error {
blueprintCommands.run(flagset, "src blueprint", usage, args)
return nil
}
// Register the command.
commands = append(commands, &command{
flagSet: flagset,
handler: handler,
usageFunc: func() { fmt.Println(usage) },
})
}