Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README to explain <target package> #182

Open
AndrewWPhillips opened this issue May 1, 2024 · 2 comments
Open

README to explain <target package> #182

AndrewWPhillips opened this issue May 1, 2024 · 2 comments
Milestone

Comments

@AndrewWPhillips
Copy link

AndrewWPhillips commented May 1, 2024

Seems like a great tool but the "quick start" in the README needs some work. It's not explained well esp. what is <target package>. It's also not very clear how it works with (just uses Go source files I think) and that it runs a webserver to serve the results (by default). (This was on Windows but I'll also try Linux when I get my Ubuntu laptop working.)

I also googled and checked the Github issues but still could not get it to work.

I tried various things with these errors (cmd shell and git-bash):

go-callvis main # -: package main is not in std (D:\Golang\go1.21.6\src\main)

$ go-callvis main # -: package main is not in GOROOT (C:\Program Files\Go\src\main)

$ go-callvis main.go # C:\Program Files\Go\src\internal\abi\abi.go:117:19: undeclared name: any + 100s more errors

$ go-callvis github.com//test # using the module name (go.mod) got same (above) error

$ go-callvis github.com//test/main # -: no required module provides package github.com//test/main

$ go-callvis test.exe # -: no required module provides package test.exe

There were also other suggestions in other issues for the README. (I'd be happy to update the README once I work out how to use it :)

@AndrewWPhillips AndrewWPhillips changed the title Improve README README to explain <target package> May 1, 2024
@AndrewWPhillips
Copy link
Author

I got it to work with go 1.18. Then working backwards now have it working with 1.21.6. Long story but when running in git-bash it is picking up the std library files from C:\Program Files\Go\src\ (which has 1.18 source code) due to GOROOT.

In summary, I believe <target package> is not the package but the module name, or (if there is only one .go file in the package) the name of the .go file.

@ondrajz
Copy link
Owner

ondrajz commented Jan 1, 2025

Thanks for raising this issue! I agree that the current usage of go-callvis can be unclear. I'll work on improving the CLI and adding detailed examples to the README to make it more user-friendly. Your feedback is very helpful and appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants