commitmessage

package
v0.0.0-...-73f16a3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2016 License: MIT Imports: 4 Imported by: 0

README

Commit Message

A helper which get you a message you could potentially use in your git commit message.

How do I use?

package main

import(
  "fmt"
  "log"

  "github.com/curt-labs/go-utensils/commitmessage"
)

func main() {
	msg, err := commitmessage.NewMessage()
	if err != nil {
		log.Fatal(err)
	}
	out, jserr := msg.ToJSON()
	if jserr != nil {
		log.Fatal(jserr)
	}
	fmt.Println(string(out))
}

Where do I go from here?

Find more sources and add them! Happy open-sourcing! 👍

Documentation

Index

Constants

View Source
const (
	//WhatTheCommitSiteURL - the url to whatthecommit
	WhatTheCommitSiteURL = "http://whatthecommit.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageBody

type MessageBody struct {
	Message string `json:"message"`
}

MessageBody - the message body structure

func NewMessage

func NewMessage() (MessageBody, error)

NewMessage - creates a new message structure

func (*MessageBody) ToJSON

func (m *MessageBody) ToJSON() ([]byte, error)

ToJSON - message body output in json

func (*MessageBody) ToString

func (m *MessageBody) ToString() (string, error)

ToString - message body just as a string

func (*MessageBody) ToXML

func (m *MessageBody) ToXML() ([]byte, error)

ToXML - message body output in xml

Jump to

Keyboard shortcuts

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