GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mrclmr/annot: Annotate a string line with arrows leading to a description.

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.golangci.yml
.golangci.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
annot.go
annot.go
 
 
annot_test.go
annot_test.go
 
 
error.go
error.go
 
 
example_test.go
example_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

build Go Report Card

Annot

Annotate a string line leading to a description.

The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.
 ↑  └──┬───┘          └───┬───┘                 ↑
 │     └─ adjective       │                     └─ comma
 │                        │
 └─ article               └─ facts, information, and skills acquired
                             through experience or education;
                             the theoretical or practical understanding
                             of a subject.

Installation

go get github.com/mrclmr/annot

Example

package main

import (
	"fmt"

	"github.com/mrclmr/annot"
)

func main() {
	fmt.Println("The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.")
	fmt.Println(annot.String(
		&annot.Annot{Col: 1, Lines: []string{"article"}},
		&annot.Annot{Col: 4, ColEnd: 11, Lines: []string{"adjective"}},
		&annot.Annot{Col: 22, ColEnd: 30, Lines: []string{
			"facts, information, and skills acquired",
			"through experience or education;",
			"the theoretical or practical understanding",
			"of a subject.",
		}},
		&annot.Annot{Col: 48, Lines: []string{"comma"}},
	))
}

Output:

The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.
 ↑  └──┬───┘          └───┬───┘                 ↑
 │     └─ adjective       │                     └─ comma
 │                        │
 └─ article               └─ facts, information, and skills acquired
                             through experience or education;
                             the theoretical or practical understanding
                             of a subject.

About

Annotate a string line with arrows leading to a description.

Topics

annotationarrowsasciiascii-artdescriptiongogolang

Resources

Readme
MIT license
Activity

Stars

20 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.