How to return only one variable in multi return function in GO?
<p>Hi I have this function which I want to return a <a href="https://godoc.org/github.com/fsouza/go-dockerclient#APIContainers" rel="nofollow">docker.APIContainer</a> and an error (nil if no errors), but in case of error what should I return in docker.APIContainer ? </p>

<p>this is the code </p>

<pre><code>func GetContainersRunningImage(imagename string, tag string) ([]docker.Container,string) {
   logFields := log.Fields{

       "handler": "get service",
   }
   client, err := docker.NewTLSClient(sconf.DockConf.Endpoint, sconf.DockConf.Cert, sconf.DockConf.Key, sconf.DockConf.Ca)
   if err != nil {
      log.WithFields(logFields).Errorf("TLSClient could not be created: %s", err)
      return _,err.Error()
   }
}
</code></pre>

<p>what should I add instead of _? Am I obliged to create a <code>var contarray []docker.Container</code> and return it? or is there another way</p>