Documentation ¶
Overview ¶
Package cmd contains the main desprite CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "desprite IMAGE CSS [CSS]...", Example: " desprite sprite.png first.css second.css --verbose", Short: "desprite splits sprite images by CSS usage", Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { run(args[0], args[1:]) }, }
RootCmd is the main desprite command.
Functions ¶
This section is empty.
Types ¶
type IOGroup ¶
type IOGroup interface { // Limit returns the rate limit for this IOGroup. Limit() int // Take consumes a rate token and increments the WaitGroup counter. // It must be returned with Done(). Take() // Done returns a rate token and decrements the WaitGroup counter. Done() // Wait blocks until the WaitGroup counter is zero. Wait() }
IOGroup wraps a WaitGroup with an additional rate-limit interface. It is meant for a group of goroutines dealing with file ops.
func NewIOGroup ¶
func NewIOGroup() IOGroup
NewIOGroup creates a best-effort IOGroup. Limit is determined dynamically with syscall, or falls back to a safe value.
Click to show internal directories.
Click to hide internal directories.