Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CommitHash string BuildTime string Tag string )
View Source
var Alias, Channel, Event string
View Source
var RootCmd = &cobra.Command{ Use: "cda URL SHORTCODE", Short: "a URL Shortening service and corresponding command line tool", Long: `cda is a URL shortening service that automatically appends the appropriate tracking tags to a URL. The command line tool can be used to submit a new link using personalized values.`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { err := submit(args[0]) if err != nil { fmt.Println("Error: ", err) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
type Database ¶
type Database interface { Get(shortcode string) (string, error) Save(shortcode, url string) (string, error) }
Database interface
type Submission ¶
type Submission struct {
URL string `json:"url"`
}
Click to show internal directories.
Click to hide internal directories.