Comments (6)
@jpo-joyent @yrobla @pwFoo @blp1526 would you all mind doing a quick review of this patch please?
If you are using ghw
as a library (versus the ghwc
CLI tool) and are referencing the ghw.Disk.BusType
field, this patch will end up breaking your code if you haven't pinned your ghw
dependency to 0.2 release or prior. Can you let me know if you're OK with this? ghw
is still in a fluid pre-1.0 release state and I'm trying to clean things like this up before the 1.0 release.
Thank you!
-jay
from ghw.
Change is ok for me . We are not yet using library (although we want to) , but using ghwc CLI tool.
from ghw.
LGTM.
(This Makefile
has make lint
, and it warns us "don't use ALL_CAPS in Go names; use CamelCase (golint)" at bus_type.go
. If ghw
keeps using gometalinter
, I think that it is better to modify the warning lines.)
from ghw.
Yeah, I'm not a fan of that particular Go-ism. Maybe it's my C background but I just like having constants use ALL_CAPS. So, that's not going to change... I might just remove the warning lines for that.
from ghw.
Yep, broke my code but was trivial to fix. Thank you for giving us a heads up! :)
from ghw.
Actually no, this breaks macOS again, and in a way that I can not easily fix.
In macOS, the bus type is a string that comes from the IOKit BusProtocol field, whose legal values are not documented, and whose source is not available. The only value I've seen is PCI-Express
, but this does not mean other things are not possible, just that I have not seen them so far. BusType being a string let me just pass them through and let the caller have something useful in cases I have not anticipated, but now I don't have a clean option. Always pass BUS_TYPE_UNKNOWN? That seems less than ideal...
from ghw.
Related Issues (20)
- update golang stack in CI HOT 2
- NIC on Windows has IsVirtual always set to false HOT 1
- I am surprised HOT 2
- May disk's driver type need more checks HOT 5
- Properly detect iSCSI disks HOT 2
- Properly detect dm devices HOT 3
- ghw-snapshot broken on Linux >= 5.16-rc3: hugepages demote HOT 1
- GPU information cannot be queried after virtual machine GPU pass through. By traversing the PCI information, it is found that the driver is not NVIDIA but vfio PCI. Can I add a vendor Name judge whether the PCI identification is GPU HOT 2
- replace ethtool invocation with go packages HOT 1
- drop use of blkid on block_linux.go HOT 1
- ghw.PCI throw an exception “pciFillInfo not implemented on windows” HOT 6
- github.com/StackExchange/wmi is archived, change it HOT 1
- too many open files error when using ghw in gotop client HOT 1
- Panic when collecting host information HOT 5
- Consider updating declared Go version in go.mod HOT 1
- On my windows, sometimes it show error: Cannot change thread mode after it is set HOT 7
- ci: enable gh actions with arm64 HOT 1
- ARM: failed to determine memory area for node: open /sys/devices/system/memory/block_size_bytes: no such file or directory HOT 7
- HDD is classified as SSD on windows 10 HOT 1
- Linux: failed to determine memory area for node: open /sys/devices/system/node/node0/memory_failure/state: no such file or directory HOT 11
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 ghw.