Git Product home page Git Product logo

Comments (6)

jaypipes avatar jaypipes commented on May 11, 2024

@jpo-joyent @yrobla @pwFoo @blp1526 would you all mind doing a quick review of this patch please?

#109

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.

yrobla avatar yrobla commented on May 11, 2024

Change is ok for me . We are not yet using library (although we want to) , but using ghwc CLI tool.

from ghw.

blp1526 avatar blp1526 commented on May 11, 2024

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.

jaypipes avatar jaypipes commented on May 11, 2024

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.

jpo-joyent avatar jpo-joyent commented on May 11, 2024

Yep, broke my code but was trivial to fix. Thank you for giving us a heads up! :)

from ghw.

jpo-joyent avatar jpo-joyent commented on May 11, 2024

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)

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.