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

Got "Invalid memory address or nil pointer dereference" #60

Open
emmayylu opened this issue Nov 24, 2022 · 1 comment
Open

Got "Invalid memory address or nil pointer dereference" #60

emmayylu opened this issue Nov 24, 2022 · 1 comment

Comments

@emmayylu
Copy link

I am pretty new to Golang. I've been trying the "Try it out" section in the README for more than one hour and still haven't figured out how to use it successfully.

I have tried different working directories and changed different things. I would describe the closest I can get even though I don't think what I am doing makes sense:

pwd shows I am inside folder_a/gen-crd-api-reference-docs.
Folder structure currently looks like:

+-- folder_a
|     +-- my_project
|            +-- api
|                  +-- component.html
|                  +-- component.md
|            +--pkg
|                 +-- apis
|                        +-- component
|                               +-- v1alpha1
|                                      +-- types.go
|     +-- gen-crd-api-reference-docs
|            +-- gen-crd-api-reference-docs
|            +-- example-config.json

Command I run:

./gen-crd-api-reference-docs \
-config "./example-config.json" \
-api-dir "github.com/knative/build/pkg/apis/build/v1alpha1" \
-out-file docs.html

my GOPATH: "/Users/myname/go"
Error: invalid memory address or nil pointer dereference

I am currently just learning how to use it, but my end goal is to make changes to component.md and component.html based on types.go

What did I do wrong? How can I fix it? Thanks for your help in advance!

@ahmetb
Copy link
Owner

ahmetb commented Nov 25, 2022

I recommend looking at the projects using it (see README) and see how they do it. The tool has a lot of rough edges.

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

No branches or pull requests

2 participants