Skip to content

Commit

Permalink
Added the init() method to the shadow backend and SQL backend code (#365
Browse files Browse the repository at this point in the history
)

* Added the init() method to the shadow backend code

* Removing .swp file

* Added init method to sql backend as well

---------

Co-authored-by: Gaurav Kumar <gauravk@uber.com>
  • Loading branch information
gkeesh7 and gauravkuber authored Sep 24, 2024
1 parent 7ebe432 commit bb8e894
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/backend/shadowbackend/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ import (
"gopkg.in/yaml.v2"
)

const _shadow = "shadow"

func init() {
backend.Register(_shadow, &factory{})
}

type factory struct{}

func (f *factory) Name() string {
return "shadow"
return _shadow
}

func (f *factory) Create(
Expand Down
4 changes: 4 additions & 0 deletions lib/backend/sqlbackend/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import (

const _sql = "sql"

func init() {
backend.Register(_sql, &factory{})
}

type factory struct{}

func (f *factory) Name() string {
Expand Down

0 comments on commit bb8e894

Please sign in to comment.