Git Product home page Git Product logo

go-protobuf-import-example's Introduction

go-protobuf-import-example

Example of how to import versioned protobuf definitions from Go packages when using Go modules.

This code is to accompany my blog post Importing protobuf definitions with Go modules, please read for more details.

TL;DR

Symlink directories of individual modules (obtained from go list) under one folder, or populate vendor directory by running go mod vendor. Paths within that directory then match relative import paths used in protobuf import statement and you can run protoc with -I ./vendor flag.

Requirements

Usage

Run make for help:

$ make
help                           Print list of tasks
build                          Build go project
proto-link                     Generate go protobuf files using symlinked modules
proto-vendor                   Generate go protobuf files using go mode vendor
run                            Runs the demo server

go-protobuf-import-example's People

Contributors

stepanstipl avatar

Stargazers

 avatar Ryan Oles avatar  avatar  avatar Laurentiu Ilie avatar cathy avatar Matty Evans avatar Niklas Hansson avatar William Zhang avatar Andrew Meiling avatar Jaspr Wang avatar Krisztian Litkey avatar 孙琦 avatar Alex Ehrnschwender avatar Marlon Ou avatar Raunak Kumar avatar iamnull avatar Asaduzzaman Pavel avatar Kayden Althen avatar

Watchers

James Cloos avatar  avatar  avatar

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.