You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,6 @@ Please note we have a code of conduct, please follow it in all your interactions
7
7
## Pull Request Process
8
8
9
9
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
10
-
2. Update the README.md with detafils of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
10
+
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
11
11
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](https://semver.org).
12
12
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
Copy file name to clipboardExpand all lines: cmd/root.go
+47-30Lines changed: 47 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -11,28 +11,29 @@ import (
11
11
)
12
12
13
13
var (
14
-
titles=false
15
-
width=100
14
+
titles=false
15
+
width=100
16
+
searchTerm=""
16
17
)
17
18
18
-
// rootCmd represents the base command when ctitlesed without any subcommands
19
+
// rootCmd represents the base command when called without any subcommands
19
20
varrootCmd=&cobra.Command{
20
21
Use: "httpref [filter]",
21
22
Args: cobra.MaximumNArgs(1),
22
23
Short: "Command line access to HTTP references",
23
24
Long: paragraphical.Format(width, `This displays useful information related to HTTP.
24
25
25
-
It will prefer exact matches where there are mutliple entries matching the filter (e.g. Accept and Accept-Language). If you want to match everything with the same prefix then you can use * as a wildcard suffix, for example:
26
+
It will prefer exact matches where there are multiple entries matching the filter (e.g. Accept and Accept-Language). If you want to match everything with the same prefix then you can use * as a wildcard suffix, for example:
26
27
httpref 'Accept*'
27
28
28
29
Most of the content comes from the Mozilla developer documentation (https://developer.mozilla.org/en-US/docs/Web/HTTP) and is copyright Mozilla and individual contributors. See https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses for details.
29
30
30
31
Ports can only be looked up using the 'ports' sub command. You can also look up ports inside a range. Information on ports comes from https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers under the Creative Commons Attribution-ShareAlike License.`),
31
-
RunE: root,
32
+
Run: root,
32
33
}
33
34
34
35
// Execute adds titles child commands to the root command and sets flags appropriately.
35
-
// This is ctitlesed by main.main(). It only needs to happen once to the rootCmd.
36
+
// This is called by main.main(). It only needs to happen once to the rootCmd.
36
37
funcExecute() {
37
38
iferr:=rootCmd.Execute(); err!=nil {
38
39
fmt.Println(err)
@@ -43,6 +44,7 @@ func Execute() {
43
44
funcinit() {
44
45
rootCmd.PersistentFlags().BoolVarP(&titles, "titles", "t", titles, "List titles of the summaries available")
45
46
rootCmd.PersistentFlags().IntVarP(&width, "width", "w", width, "Width to fit the output to")
0 commit comments