mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 15:38:57 +01:00
55d10f4d25
This almost 100% backwards compatible. The only difference being that in the rc options/get output DumpMode will be output as strings instead of integers. This is a lot more convenient for the user. They still accept integer inputs though so the fallout from this should be minimal.
39 lines
823 B
Go
39 lines
823 B
Go
package fs
|
|
|
|
// DumpFlags describes the Dump options in force
|
|
type DumpFlags = Bits[dumpChoices]
|
|
|
|
// DumpFlags definitions
|
|
const (
|
|
DumpHeaders DumpFlags = 1 << iota
|
|
DumpBodies
|
|
DumpRequests
|
|
DumpResponses
|
|
DumpAuth
|
|
DumpFilters
|
|
DumpGoRoutines
|
|
DumpOpenFiles
|
|
)
|
|
|
|
type dumpChoices struct{}
|
|
|
|
func (dumpChoices) Choices() []BitsChoicesInfo {
|
|
return []BitsChoicesInfo{
|
|
{uint64(DumpHeaders), "headers"},
|
|
{uint64(DumpBodies), "bodies"},
|
|
{uint64(DumpRequests), "requests"},
|
|
{uint64(DumpResponses), "responses"},
|
|
{uint64(DumpAuth), "auth"},
|
|
{uint64(DumpFilters), "filters"},
|
|
{uint64(DumpGoRoutines), "goroutines"},
|
|
{uint64(DumpOpenFiles), "openfiles"},
|
|
}
|
|
}
|
|
|
|
func (dumpChoices) Type() string {
|
|
return "DumpFlags"
|
|
}
|
|
|
|
// DumpFlagsList is a list of dump flags used in the help
|
|
var DumpFlagsList = DumpHeaders.Help()
|