awesome

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use: "awesome",

	Args: cobra.ExactArgs(1),

	Run: func(cmd *cobra.Command, args []string) {
		file := args[0]
		output, err := cmd.Flags().GetString("output")
		_errors.Check(err)
		token, err := cmd.Flags().GetString("token")
		_errors.Check(err)

		list := read(file)
		initTemplate()
		s := sortAll(context.Background(), list, token)
		y, err := yaml.Marshal(list)
		_errors.Check(err)
		_errors.Check(os.WriteFile(file, y, 0o644))
		_errors.Check(os.WriteFile(output, []byte(s), 0o644))
	},
}

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