~kota/gemgen

37391ad8c6cb4954b3c90688c91a9554e9918272 — Dakota Walsh 2 years ago 00052f2
improve comments in options package
1 files changed, 4 insertions(+), 4 deletions(-)

M options/options.go
M options/options.go => options/options.go +4 -4
@@ 38,7 38,7 @@ type Opts struct {
// flag.ErrHelp is returned and output will contain the usage message.
// Another special case is version in which the error will be ErrVersion.
func ParseArgs(progname string, args []string) (*Opts, string, error) {
	// setup flagset
	// Create flagset.
	flag := flag.NewFlagSet(progname, flag.ContinueOnError)
	var buf bytes.Buffer
	flag.SetOutput(&buf)


@@ 47,7 47,7 @@ func ParseArgs(progname string, args []string) (*Opts, string, error) {
		flag.PrintDefaults()
	}

	// define flags
	// Define flags.
	versionFlag := flag.BoolP("version", "v", false, "print version and exit")
	outputFlag := flag.StringP("output", "o", "", "directory to write gemtext files")
	templateFlag := flag.StringSliceP("template", "t", nil, "specify templates with a regular expression matching input filenames\n\tuse the form \"pattern,/path/to/template\"")


@@ 74,7 74,7 @@ func ParseArgs(progname string, args []string) (*Opts, string, error) {
		return nil, "", ErrVersion
	}

	// set basic string flags
	// Read boolean and string flags.
	opts.Output = *outputFlag
	opts.TemplateArgs = *templateFlag
	opts.GemOptions = append(


@@ 82,7 82,7 @@ func ParseArgs(progname string, args []string) (*Opts, string, error) {
		gem.WithHorizontalRule(*horizontalRuleFlag),
	)

	// create gemtext options from flags
	// Create gemtext options from flags.
	switch *emphasisFlag {
	case "none":
	case "markdown":