cmd/cue/cmd: support importing .proto files
The import command now supports .proto files.
It generates a file foo.proto.cue for a file foo.proto.
Change-Id: I6670563c149f54b8d10ee550226403cb50e3e84d
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2001
Reviewed-by: Marcel van Lohuizen <mpvl@google.com>
diff --git a/internal/protobuf/protobuf.go b/internal/protobuf/protobuf.go
index 4280d9c..958e6fb 100644
--- a/internal/protobuf/protobuf.go
+++ b/internal/protobuf/protobuf.go
@@ -52,16 +52,16 @@
return p.file, nil
}
-// ProtoError describes the location and cause of an error.
-type ProtoError struct {
+// Error describes the location and cause of an error.
+type Error struct {
Filename string
Path string
Err error
}
-func (p *ProtoError) Unwrap() error { return p.Err }
+func (p *Error) Unwrap() error { return p.Err }
-func (p *ProtoError) Error() string {
+func (p *Error) Error() string {
if p.Path == "" {
return fmt.Sprintf("parse of file %q failed: %v", p.Filename, p.Err)
}