3
0

upd(all): disable codegen for crm/types, gofmt

This commit is contained in:
Tit Petric
2018-10-08 21:18:20 +00:00
parent a6e648d4c1
commit 264ec19a9b
6 changed files with 17 additions and 15 deletions

View File

@@ -6,6 +6,8 @@ $templates = array(
},
);
$templates = array();
foreach ($templates as $template => $fn)
foreach ($apis as $api) {
if (is_array($api['struct'])) {

View File

@@ -36,7 +36,7 @@ func TestMain(m *testing.M) {
for _, name := range []string{"crm_module", "crm_content", "crm_content_column"} {
_, err := db.Exec("truncate " + name)
if err != nil {
panic("Error when clearing "+name+": "+err.Error())
panic("Error when clearing " + name + ": " + err.Error())
}
}
}

View File

@@ -11,8 +11,8 @@ import (
type (
content struct {
db *factory.DB
ctx context.Context
db *factory.DB
ctx context.Context
repository repository.ContentRepository
}
@@ -35,8 +35,8 @@ func Content() ContentService {
func (s *content) With(ctx context.Context) ContentService {
db := repository.DB(ctx)
return &content{
db: db,
ctx: ctx,
db: db,
ctx: ctx,
repository: s.repository.With(ctx, db),
}
}

View File

@@ -8,8 +8,8 @@ import (
type (
field struct {
db *factory.DB
ctx context.Context
db *factory.DB
ctx context.Context
repository repository.FieldRepository
}
@@ -27,8 +27,8 @@ func Field() FieldService {
func (s *field) With(ctx context.Context) FieldService {
db := repository.DB(ctx)
return &field{
db: db,
ctx: ctx,
db: db,
ctx: ctx,
repository: s.repository.With(ctx, db),
}
}

View File

@@ -8,8 +8,8 @@ import (
type (
module struct {
db *factory.DB
ctx context.Context
db *factory.DB
ctx context.Context
repository repository.ModuleRepository
}
@@ -31,8 +31,8 @@ func Module() ModuleService {
func (s *module) With(ctx context.Context) ModuleService {
return &module{
db: db,
ctx: ctx,
db: db,
ctx: ctx,
repository: s.repository.With(ctx, db),
}
}

View File

@@ -6,6 +6,6 @@ import (
)
func TestEvents(t *testing.T) {
repo = &repository{}
repo.With(context.Background())
repo := &repository{}
repo.With(context.Background(), nil)
}