Skip to content

Commit

Permalink
fix(examples/all): Update models to use value receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
bartventer committed Jun 2, 2024
1 parent eaa880f commit 1766db1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/echo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
)

// TableName overrides the table name used by Tenant to `tenants`.
func (u *Tenant) TableName() string { return TableNameTenant }
func (Tenant) TableName() string { return TableNameTenant }

// Tenant is the tenant model.
type Tenant struct {
Expand All @@ -50,10 +50,10 @@ type Book struct {
var _ multitenancy.TenantTabler = (*Book)(nil)

// TableName overrides the table name used by Book to `books`.
func (u *Book) TableName() string { return TableNameBook }
func (Book) TableName() string { return TableNameBook }

// IsTenantTable returns true.
func (u *Book) IsTenantTable() bool { return true }
func (Book) IsTenantTable() bool { return true }

type (
// CreateTenantBody is the request body for creating a tenant.
Expand Down
6 changes: 3 additions & 3 deletions examples/nethttp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
)

// TableName overrides the table name used by Tenant to `tenants`.
func (u *Tenant) TableName() string { return TableNameTenant }
func (Tenant) TableName() string { return TableNameTenant }

// Tenant is the tenant model.
type Tenant struct {
Expand All @@ -52,10 +52,10 @@ type Book struct {
var _ multitenancy.TenantTabler = (*Book)(nil)

// TableName overrides the table name used by Book to `books`.
func (u *Book) TableName() string { return TableNameBook }
func (Book) TableName() string { return TableNameBook }

// IsTenantTable returns true.
func (u *Book) IsTenantTable() bool { return true }
func (Book) IsTenantTable() bool { return true }

type (
// CreateTenantBody is the request body for creating a tenant.
Expand Down

0 comments on commit 1766db1

Please sign in to comment.