Documentation ¶
Overview ¶
Example ¶
package main import ( "os" "time" "moul.io/rrgc/rrgc" ) func main() { logGlobs := []string{ "*/*.log", "*/*.log.gz", } windows := []rrgc.Window{ {Every: 2 * time.Hour, MaxKeep: 5}, {Every: time.Hour * 24, MaxKeep: 4}, {Every: time.Hour * 24 * 7, MaxKeep: 3}, } _, toDelete, _ := rrgc.GCListByPathGlobs(logGlobs, windows) for _, path := range toDelete { _ = os.Remove(path) } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.