goal

package module
v0.0.0-...-66b37f2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 10 Imported by: 0

README

Goal helps you achieve your goals by using strategy and tactics straight from your terminal.

Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat. — Sun Tzu.

Have you ever seen someone, for example you :-), being or at least appearing busy but not really getting anywhere? If you don't know where you are going, you're going nowhere. You need a goal. If you have a goal but haven't thought about how to achieve it, you will get lost. You need a strategy. If you have strategy you need to get going. You need tactics.

$ go install cmd/goal.go

$ mkdir ~/goal
$ goal -e > ~/goal/karate.yaml

$ goal
① /Users/jozef/goal/karate.yaml
👉 Find a personal trainer. (do: once, done: never)
👉 Meditate daily 10 – 30 minutes. (do: daily, done: 1d ago)

$ vim /Users/jozef/goal/karate.yaml

Inspired by the book The Art of Cyber Security by Gary Hibberd.

Documentation

Overview

Package goal helps you achieve your goals by using strategy and tactics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example

func Example() string

Example returns sample YAML file content.

func Print

func Print(goals []Goal, verbose bool)

Types

type CivilTime

type CivilTime time.Time

CivilTime represents time in the format "2006-01-02".

func (*CivilTime) String

func (c *CivilTime) String() string

func (*CivilTime) UnmarshalYAML

func (c *CivilTime) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler so CivilTime can be unmarshaled from a YAML document.

type Goal

type Goal struct {
	Path        string // filesystem path; filename is goal name
	Description string
	Strategy    string    // high-level plan to reach your goal
	Tactics     []Tactic  // implementation of the strategy
	Updated     CivilTime // last update
}

Goal is where you want to get or what you want to achieve.

func Parse

func Parse(dir string) ([]Goal, error)

Parse recursively parses files in dir into goals.

type Interval

type Interval int
const (
	Once Interval = iota
	Daily
	Weekly
	Monthly
)

func (Interval) String

func (i Interval) String() string

func (*Interval) UnmarshalYAML

func (i *Interval) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler so Interval can be unmarshaled from a YAML document.

type Tactic

type Tactic struct {
	Do       string
	Done     CivilTime `yaml:"done,omitempty"`     // defaults to 0001-01-01
	Interval Interval  `yaml:"interval,omitempty"` // defaults to once
}

Tactic defines what to do and whether it's already done.

Directories

Path Synopsis
Goal helps you achieve your goals by using strategy and tactics.
Goal helps you achieve your goals by using strategy and tactics.

Jump to

Keyboard shortcuts

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