Code Monkey home page Code Monkey logo

Comments (9)

anuchandy avatar anuchandy commented on May 18, 2024

@colemickens just confirming are you using the latest bits, there was bug in locating template path which i fixed. I just pulled the latest code and tried. It worked

If you have an older version then you might want to remove 'azure-vhd-utils-for-go' from GOPATH/src/Microsoft before "go getting" the latest.

from azure-vhd-utils.

colemickens avatar colemickens commented on May 18, 2024

I just destroyed my entire GOPATH and reran it. Still repros.

$ cd $GOPATH/src/github.com/Mirosoft/azure-vhd-utils-for-go

$ git log
[...]
commit f291a0767221c47a9413038b58a4bbfb3b62ab95
[...]
Date:   Sun Mar 6 21:22:04 2016 -0800
[...]

from azure-vhd-utils.

anuchandy avatar anuchandy commented on May 18, 2024

@colemickens could you try this:

1] cd $GOPATH/src/github.com/Mirosoft/azure-vhd-utils-for-go
2] go build
3] ./azure-vhd-utils-for-go inspect footer /nix/store/igjb0w7jpjk43sxwk53l21mz118ivghn-azure-image/disk.vhd

from azure-vhd-utils.

colemickens avatar colemickens commented on May 18, 2024

Yup, that works.

from azure-vhd-utils.

anuchandy avatar anuchandy commented on May 18, 2024

cool!
The issue is, when we do "go get azure-vhd-utils-for-go", it build the binary "azure-vhd-utils-for-go" and put it in "$GOPATH/bin". This binary is unable to locate the template path because it's relative in the source code.

from azure-vhd-utils.

colemickens avatar colemickens commented on May 18, 2024

Yup, I have a similar problem with one of my projects. I'm currently solving it by distributing the binary + template folder in a docker container and encouraging people to run it that way, but that feels heavy for a tool like this. The other thing I'd considered was just embedding the template files as string constants in my Go source code, but I'm not crazy about that idea either.

from azure-vhd-utils.

colemickens avatar colemickens commented on May 18, 2024

Thanks for the fast support!

from azure-vhd-utils.

anuchandy avatar anuchandy commented on May 18, 2024

Thanks for sharing your experience, I guess in case of this tool - reasonable solution is to include template file content as string constants, I will do that.

Let me know if you come across better way of handling this.

from azure-vhd-utils.

anuchandy avatar anuchandy commented on May 18, 2024

closing, this issue is addressed by moving the templates to source file.

from azure-vhd-utils.

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.