GithubHelp home page GithubHelp logo

Comments (4)

robertojrojas avatar robertojrojas commented on June 28, 2024

I've been looking into this issue and here is one idea on addressing the build tag guard.
I thought about creating 3 files like so:
libvirtgo.go (this file contains implementation methods entry point for Monitor, etc...
It will call the correct implementation method based on the GOOS where it's built)

libvirtgo_linux.go (this file contains the calls to libvirt-go package)

libvirtgo_others.go [build tag: // +build !linux](this file contains operations returning error stubs)
Of course, there will be *_test.go files with the corresponding tests.

Does this make sense?

from go-qemu.

mdlayher avatar mdlayher commented on June 28, 2024

Yep, seems reasonable to me. I'm happy as long as it compiles on all platforms, even if every method returns an error when not running on Linux.

from go-qemu.

robertojrojas avatar robertojrojas commented on June 28, 2024

I'm getting closer to a PR for this issue. As for the dependency to the libvirt-go package, would Go 1.5+ vendoring suffice?

from go-qemu.

mdlayher avatar mdlayher commented on June 28, 2024

Since we are providing packages and not an application, we don't explicit vendor our dependencies. Importing it without vendoring is fine, especially because both repositories belong to DigitalOcean.

from go-qemu.

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.