title: Assistance needed with struct concept in golang
body: <p>I want to use slacknotificationprovider in the NewNotifier function. How can I do it. Also I want send a string(config.Cfg.SlackWebHookURL) in newNotifier function. What should I do? Also please suggest me some material to get a deeper knowledge of struct and interface in golang.
  I also want to know why ProviderType.Slack is not defined as I have mentioned it in ProviderType struct as of SlackNotificationProvider type? Thanks.</p>
  
  <pre class="lang-golang prettyprint-override"><code>type SlackNotificationProvider struct {
      SlackWebHookURL string
      PostPayload     PostPayload
  }
  </code></pre>
  
  <pre class="lang-golang prettyprint-override"><code>type ProviderType struct {
      Slack   SlackNotificationProvider
      Discord DiscordNotificationProvider
  }
  </code></pre>
  
  <pre class="lang-golang prettyprint-override"><code>type Notifier interface {
      SendNotification() error
  }
  </code></pre>
  
  <pre class="lang-golang prettyprint-override"><code>func NewNotifier(providerType ProviderType) Notifier {
      if providerType == ProviderType.Slack {
          return SlackNotificationProvider{
              SlackWebHookURL: SlackWebHookURL,
          }
      } else if providerType == ProviderType.Discord {
          return DiscordNotificationProvider{
              DiscordWebHookURL: SlackWebHookURL + "/slack",
          }
      }
      return nil
  }
  </code></pre>
  
  <pre class="lang-golang prettyprint-override"><code>slackNotifier := NewNotifier(config.Cfg.SlackWebHookURL)
  </code></pre>
  
  <p>Errors:
  1. cannot use config.Cfg.SlackWebHookURL (type string) as type ProviderType in argument to NewNotifiergo
  2. ProviderType.Slack undefined (type ProviderType has no method Slack)go</p>