Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | cmd/hancock: upstream api change (command) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
147f7dbacef567a412fd536cdd8f1c2e |
User & Date: | dnc 2019-06-05 01:40:24 |
Context
2019-06-07
| ||
00:03 | cmd/hancock: support testimony to local file, publish later introducing publish operation check-in: 0cefd98c32 user: dnc tags: trunk | |
2019-06-05
| ||
01:40 | cmd/hancock: upstream api change (command) check-in: 147f7dbace user: dnc tags: trunk | |
2019-05-27
| ||
15:34 | testimony may repudiate or confirm source Added quality to manifest to indicate valid or not check-in: 257ff3a491 user: dnc tags: trunk | |
Changes
Changes to cmd/hancock/hancock.go.
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
"github.com/pkg/errors" "src.d10.dev/command" "src.d10.dev/command/config" ) func main() { command.Description = `Create and inspect Hancock Protocol activity.` _, err := command.Config() if errors.Cause(err) == config.ConfigNotFound { // not a problem, we'll use defaults // TODO(dnc): if -config specified explicitly on command line, make this a fatal error command.Info(err) err = nil ................................................................................ // this command requires an operation if len(flag.CommandLine.Args()) < 1 { flag.CommandLine.Usage() os.Exit(1) } // default prefix for subcommand log.SetPrefix(fmt.Sprintf("hancock %s: ", flag.CommandLine.Args()[0])) // TODO fix colons. if command.CurrentOperation() != nil { err = command.CurrentOperation().Handler() } if err != nil { command.UsageError(err) command.Usage() } command.Exit() } |
>
>
|
>
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
"github.com/pkg/errors" "src.d10.dev/command" "src.d10.dev/command/config" ) func main() { command.RegisterCommand(command.Command{ Application: `hancock`, Description: `Create and inspect Hancock Protocol activity.`, }) _, err := command.Config() if errors.Cause(err) == config.ConfigNotFound { // not a problem, we'll use defaults // TODO(dnc): if -config specified explicitly on command line, make this a fatal error command.Info(err) err = nil ................................................................................ // this command requires an operation if len(flag.CommandLine.Args()) < 1 { flag.CommandLine.Usage() os.Exit(1) } // default prefix for subcommand log.SetPrefix(fmt.Sprintf("hancock %s: ", flag.CommandLine.Args()[0])) if command.CurrentOperation() != nil { err = command.CurrentOperation().Handler() } if err != nil { command.UsageError(err) command.Usage() } command.Exit() } |