We all know dependency injection makes packages decoupled.
But I'm a little confused about best practices of dependency injection in go.  

Lets assume package User needs to access Config package.  

We can pass a Config object to User methods. In this way I can change the Config package functionality as long as the new code resolves the interfaces.
Another approach is call Config package methods directly , In these scenario I can change Config code too as long as the methods names remains the same. Like so

Update :
--------

What is different between these two approaches :

```
package User

func foo(config ConfigObject) {
   config.Foo()
}

```

And this one : 

```
package User

import Config

func foo() {
   config.Foo()
}

```