url

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2023 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UrlCmd = &cobra.Command{
	Use:   "url",
	Short: "Print the byte URL given the slug.",
	Args:  cobra.RangeArgs(0, 1),
	RunE: func(cmd *cobra.Command, args []string) error {

		if len(args) == 1 {
			printUrl(args[0])
			return nil
		}

		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			printUrl(scanner.Text())
		}

		if err := scanner.Err(); err != nil {
			return err
		}

		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL