Skip to content

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

Open
@emmayylu

Description

@emmayylu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions