Comments (4)
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.
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.
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.
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)
- qmp: consider deprecating LibvirtShellMonitor HOT 5
- qemu: consider moving to github.com/digitalocean/go-qemu/qemu HOT 1
- Bindings fail to run on libvirtd 1.3.1 with Go 1.7 HOT 6
- Start New Machine Instances HOT 1
- Stack overflow when marshaling QMP generated structs. HOT 1
- qmp: goroutine leak in SocketMonitor HOT 1
- bufio.Scanner: token too long HOT 1
- qemu domain not listed HOT 1
- Do not use this digitalocean!
- AWS instance with kvm access remotely
- Readme improvement
- Changes in github.com/digitalocean/go-libvirt prevent build
- qmp listen goroutine stuck on send of error forever
- [feature request] interact with QEMU Guest agent
- Compatible with qemu 6.x HOT 1
- Code generator (parsing) needs fixing to be compatible with newer versions of the QAPI spec
- Marshaling any discriminated union (flat union) into JSON overflows the stack
- implement templates/event
- Calling qmp.Disconnect() before qmp.Connect() returns blocks indefinitely HOT 1
- go-qemu import not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-qemu.