Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Firas Darwish committed Jan 10, 2025
1 parent 8f24e67 commit 8ce96a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Go Reference](https://pkg.go.dev/badge/github.com/firasdarwish/ore.svg)](https://pkg.go.dev/github.com/firasdarwish/ore)
[![Go Report Card](https://goreportcard.com/badge/github.com/firasdarwish/ore)](https://goreportcard.com/report/github.com/firasdarwish/ore)
[![Go Reference](https://pkg.go.dev/badge/github.com/firasdarwish/ore.svg)](https://pkg.go.dev/github.com/firasdarwish/ore)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go?tab=readme-ov-file#dependency-injection)
[![codecov](https://codecov.io/gh/firasdarwish/ore/graph/badge.svg?token=ISZVCCYGCR)](https://codecov.io/gh/firasdarwish/ore)

Expand Down Expand Up @@ -104,10 +103,10 @@ type MyService struct {

func main() {
// Register a singleton service
ore.RegisterSingleton(&MyService{Message: "Hello, Ore!"})
ore.RegisterSingleton[SomeServiceInterface](&MyService{Message: "Hello, Ore!"})

// Resolve the service
service, _ := ore.Get[*MyService](context.Background())
service, _ := ore.Get[*SomeServiceInterface](context.Background())
fmt.Println(service.Message) // Output: Hello, Ore!
}
```
Expand Down

0 comments on commit 8ce96a3

Please sign in to comment.