gonote

package module
v0.0.0-...-f8bb85b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2018 License: BSD-2-Clause Imports: 9 Imported by: 0

README

gonote

Library and CLI tool for parsing Go project documentation notes

Overview

gonote provides the ability to recursively parse a Go project space for godoc notes. These notes are described in the godoc library documentation.

Godoc notes are structured comments found in Go source code. These notes take the form of a marker, an UID, and a body:

MARKER(uid): note body

The marker labels the category of comment. For example, you may have a comment related to describing a known bug, in which case the marker would be BUG. You could also have a marker for labeling a TODO item, where the marker would be TODO. In both cases, the UID could be a username responsible for following up on that issue. The note body contains any related details.

Examples

Here are a few examples of godoc notes from the Go standard library:

Installation

gonote requires Go v1.10+ and a valid Go workspace.

To install:

go get -u github.com/pokstad/gonote/gonote

Usage

  OVERVIEW:

    gonote scans Go source code files for notations

  USAGE:

    gonote [OPTIONS] TARGET

  TARGET:

    the Go package path you wish to scan

  OPTIONS:

    -output [json|text|textmate]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllNotes

func AllNotes(target, base string) (map[string][]Note, error)

AllNotes returns all notes for all packages in a directory

Types

type Note

type Note struct {
	Tag  string
	UID  string
	Body string
	Loc  gomate.CodeRef
}

Note is a godoc note found in Go source code comments

func (Note) String

func (n Note) String() string

Directories

Path Synopsis
notes is a utility that recursively scans all note markings in a directory and returns a representation of those notes mapped by tag and ID to the actual note and location.
notes is a utility that recursively scans all note markings in a directory and returns a representation of those notes mapped by tag and ID to the actual note and location.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL