Fixed http custom resolvers not working

dev
Ice3man543 2021-02-09 18:13:42 +05:30
parent 10ba90cb31
commit 21ee675cbb
1 changed files with 6 additions and 6 deletions

View File

@ -16,11 +16,6 @@ import (
// ParseOptions parses the command line flags provided by a user
func ParseOptions(options *types.Options) {
err := protocolinit.Init(options)
if err != nil {
gologger.Fatal().Msgf("Could not initialize protocols: %s\n", err)
}
// Check if stdin pipe was given
options.Stdin = hasStdin()
@ -45,12 +40,17 @@ func ParseOptions(options *types.Options) {
// Validate the options passed by the user and if any
// invalid options have been used, exit.
if err = validateOptions(options); err != nil {
if err := validateOptions(options); err != nil {
gologger.Fatal().Msgf("Program exiting: %s\n", err)
}
// Load the resolvers if user asked for them
loadResolvers(options)
err := protocolinit.Init(options)
if err != nil {
gologger.Fatal().Msgf("Could not initialize protocols: %s\n", err)
}
}
// hasStdin returns true if we have stdin input