Git Product home page Git Product logo

Comments (13)

grepory avatar grepory commented on September 28, 2024 2

@peter-edge Hi. Sorry for this, but I just started doing:

sed -i 's/import google_protobuf "google\/protobuf"/import google_protobuf "github.com\/peter-edge\/go-google-protobuf"/' ${proto_dir}/checker.pb.go

Because works. Let me know if I can do anything to help maintain. I'm not sure of how it might be integrated into this project, exactly. But yeah... I have this problem, too.

from protobuf.

grepory avatar grepory commented on September 28, 2024

Why are you so awesome? Thanks. ❤️

from protobuf.

chancez avatar chancez commented on September 28, 2024

This would be awesome. It would make using protobuf with Go significantly easier

from protobuf.

chai2010 avatar chai2010 commented on September 28, 2024

build type.proto failed:

protoc version:

protoc --version
libprotoc 3.0.0

error message:

protoc --go_out=. any.proto source_context.proto type.proto
google/protobuf/any.proto:94:10: "google.protobuf.Any.type_url" is already defined in file "any.proto".
google/protobuf/any.proto:97:9: "google.protobuf.Any.value" is already defined in file "any.proto".
google/protobuf/any.proto:73:9: "google.protobuf.Any" is already defined in file "any.proto".
google/protobuf/source_context.proto:46:10: "google.protobuf.SourceContext.file_name" is already defined in file "source_context.proto".
google/protobuf/source_context.proto:43:9: "google.protobuf.SourceContext" is already defined in file "source_context.proto".
type.proto: Import "google/protobuf/any.proto" was not found or had errors.
type.proto: Import "google/protobuf/source_context.proto" was not found or had errors.
type.proto:55:3: "google.protobuf.SourceContext" seems to be defined in "source_context.proto", which is not imported by "type.proto".  To use it here, please add the necessary import.
type.proto:147:3: "google.protobuf.SourceContext" seems to be defined in "source_context.proto", which is not imported by "type.proto".  To use it here, please add the necessary import.
type.proto:167:3: "google.protobuf.Any" seems to be defined in "any.proto", which is not imported by "type.proto".  To use it here, please add the necessary import.

from protobuf.

grepory avatar grepory commented on September 28, 2024

😽

from protobuf.

LK4D4 avatar LK4D4 commented on September 28, 2024

It would be really nice to have those packages compiled

from protobuf.

dsymonds avatar dsymonds commented on September 28, 2024

8ea33d2 adds some initial types. I'll add more shortly.

from protobuf.

dsymonds avatar dsymonds commented on September 28, 2024

There's zero diff from the google/protobuf .proto files (except for adding a go_package option to make protoc-gen-go generate a good package name, which I hope to upstream).

I put them in separate Go packages since that seemed to make more sense to me, and couldn't think of compelling reasons for them to all be in the same package (their existing package declarations notwithstanding). But I'm happy to hear arguments for them all going together.

from protobuf.

dsymonds avatar dsymonds commented on September 28, 2024

Any arguments, @peter-edge?

from protobuf.

dsymonds avatar dsymonds commented on September 28, 2024

Okay, I'll leave it as I have it now. Neither approach is perfect, and we can consider changing it in the future, but the current state should be fine.

from protobuf.

azr avatar azr commented on September 28, 2024

About date/durations,

how about creating some func to get/set timestamps from golang time ?

Like func NewTimestamp(time.Time) *Timestamp and func (t *Timestamp) Time() time.Time & same for Durations ?

Directly in the timestamp pkg, I think it's fine if it's not generated.

from protobuf.

cybrcodr avatar cybrcodr commented on September 28, 2024

I think you are looking for...
https://godoc.org/github.com/golang/protobuf/ptypes#Timestamp
https://godoc.org/github.com/golang/protobuf/ptypes#TimestampProto

Btw, I don't think your comment is related to the original issue.

from protobuf.

azr avatar azr commented on September 28, 2024

Ah, thx @cybrcodr.
I put it here bcs #49 redirects here, not that much related, yes, sry ! Cheers !

from protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.