- Added datawells subcommand
- Altered the request format to match the new api request structure - Altered max results per page to reflect updated Dehashed API max (10000)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package files
|
||||
|
||||
import "strings"
|
||||
|
||||
type FileType int32
|
||||
|
||||
const (
|
||||
@@ -7,19 +9,22 @@ const (
|
||||
XML
|
||||
YAML
|
||||
TEXT
|
||||
GREPPABLE
|
||||
UNKNOWN
|
||||
)
|
||||
|
||||
func GetFileType(filetype string) FileType {
|
||||
switch filetype {
|
||||
switch strings.ToLower(strings.TrimSpace(filetype)) {
|
||||
case "json":
|
||||
return JSON
|
||||
case "xml":
|
||||
return XML
|
||||
case "yaml":
|
||||
return YAML
|
||||
case "txt":
|
||||
case "txt", "text":
|
||||
return TEXT
|
||||
case "grep", "greppable":
|
||||
return GREPPABLE
|
||||
default:
|
||||
return JSON
|
||||
}
|
||||
@@ -35,6 +40,8 @@ func (ft FileType) String() string {
|
||||
return "yaml"
|
||||
case TEXT:
|
||||
return "txt"
|
||||
case GREPPABLE:
|
||||
return "grep"
|
||||
default:
|
||||
return "json"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user