Skip to content

Commit

Permalink
fix: move DI to separate package
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
  • Loading branch information
CarstenLeue committed Dec 18, 2023
1 parent 49e89de commit 7bceb85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ioeither/http/di.go → ioeither/http/di/di.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package http
package di

import (
"net/http"

DI "github.com/IBM/fp-go/di"
IOE "github.com/IBM/fp-go/ioeither"
IOEH "github.com/IBM/fp-go/ioeither/http"
L "github.com/IBM/fp-go/lazy"
)

Expand All @@ -28,5 +29,5 @@ var (
InjHttpClient = DI.MakeTokenWithDefault0("HTTP_CLIENT", L.Of(IOE.Of[error](http.DefaultClient)))

// InjClient is the injection token for the default [Client]
InjClient = DI.MakeTokenWithDefault1("CLIENT", InjHttpClient.IOEither(), IOE.Map[error](MakeClient))
InjClient = DI.MakeTokenWithDefault1("CLIENT", InjHttpClient.IOEither(), IOE.Map[error](IOEH.MakeClient))
)

0 comments on commit 7bceb85

Please sign in to comment.