Add suggestion to error message
This commit is contained in:
Родитель
0157d43ed0
Коммит
14683d35de
|
@ -227,7 +227,7 @@ func parseServiceDefinition(cfg *truss.Config) (deftree.Deftree, *svcdef.Svcdef,
|
|||
// Create the svcdef
|
||||
sd, err := svcdef.New(pbgoFiles, pbFiles)
|
||||
if err != nil {
|
||||
return nil, nil, errors.Wrapf(err, "failed to create service definition")
|
||||
return nil, nil, errors.Wrapf(err, "failed to create service definition; did you pass ALL the protobuf files to truss?")
|
||||
}
|
||||
|
||||
// Create the Deftree
|
||||
|
|
|
@ -84,7 +84,7 @@ service Map {
|
|||
}
|
||||
}`
|
||||
// From code, build our SvcDef
|
||||
sd, err := New([]io.Reader{strings.NewReader(goCode)}, []io.Reader{strings.NewReader(protoCode)})
|
||||
sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(goCode)}, map[string]io.Reader{"/tmp/alsonotreal": strings.NewReader(protoCode)})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir scrap/
|
||||
cd scrap/
|
||||
cp ../test-proto.txt ./svc.proto
|
||||
truss *.proto
|
||||
cp TEST-service/svc.pb.go ../test-go.txt
|
||||
cd ../
|
||||
rm -r scrap
|
|
@ -17,7 +17,7 @@ func TestSvcdef(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
sd, err := New([]io.Reader{gf}, []io.Reader{pf})
|
||||
sd, err := New(map[string]io.Reader{"./test-go.txt": gf}, map[string]io.Reader{"./test-proto.txt": pf})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ type NestedTypeRequest struct {
|
|||
B []*NestedMessageB
|
||||
C EnumType
|
||||
}`
|
||||
sd, err := New([]io.Reader{strings.NewReader(caseCode)}, nil)
|
||||
sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(caseCode)}, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ type MsgWithMap struct {
|
|||
Beta map[int64]*NestedMessageC
|
||||
}
|
||||
`
|
||||
sd, err := New([]io.Reader{strings.NewReader(caseCode)}, nil)
|
||||
sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(caseCode)}, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче