Clean up unnecessary files

Jason T. Lenz 1 year ago
parent ebb80ce95f
commit ec372e8a62
  1. 2
  2. 57
  3. 2
  4. 35
  5. 19
  6. 92

@ -1,4 +1,4 @@
Copyright (c) 2020 Jason T. Lenz. All rights reserved.
Copyright (c) 2021 Jason T. Lenz. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

@ -1,57 +0,0 @@
PNAME = chunkio
RTEMPLATE ?= ../repo-template
all: check
.PHONY: all
#---Golang Library Section---
GO ?= go
GOSRC != find . -name '*.go'
check: $(GOSRC)
$(GO) test $(GOFLAGS)
.PHONY: check
#---Generate Main Documents---
pgot -i ":$(RTEMPLATE)" -o template/
.PHONY: regenDocMain
#---Generate Makefile---
pgot -i ":$(RTEMPLATE)" -o Makefile template/
.PHONY: regenMakefile
#---Lint Helper Target---
@find . -path ./.git -prune -or \
-type f -and -not -name 'Makefile' \
-exec grep -Hn '<no value>' '{}' ';'
.PHONY: lint
#---TODO Helper Target---
@find . -path ./.git -prune -or \
-type f -and -not -name 'Makefile' \
-exec grep -Hn TODO '{}' ';'
.PHONY: todo
# vim:set noet tw=80:

@ -77,7 +77,7 @@ func ExampleUppercase() {
## Running the tests
$ make check
$ go test
## Contributing

@ -1,35 +0,0 @@
"pgotInclude" : [
PNAME = chunkio
RTEMPLATE ?= ../repo-template
all: check
.PHONY: all
{{template "mk-goLib" .}}
{{template "mk-docMain" .}}
{{template "mk-mkFile" .}}
{{template "mk-lint" .}}
{{template "mk-todo" .}}
# vim:set noet tw=80:

@ -1,19 +0,0 @@
# Purpose
This "template" folder contains templates and associates scripts to generate
standard repository files such as and LICENSE. This is primarily
used by the author to ensure consistency across repositories and can safely be
ignored by most end users and contributors.
# Usage
If you do desire to use or process templates in this folder make sure you have
cloned the git repository at <>.
The cloned "repo-template" respository should ideally exist one level outside
this repository root. I.E. ../repo-template
Once this is in place you can regenerate the documents from templates using the
following command from the main repository folder:
$ make regenMakefile
$ make regenDocMain

@ -1,92 +0,0 @@
"rname": "chunkio",
"pgotInclude": [ "README.src/" ]
# {{.rname}}
**{{.rname}}** is a golang package that provides functionality for transparently
reading a subset of a stream containing a user defined ending byte sequence.
When the byte sequence is reached an EOF is returned. This sub stream can be
accessed or passed to other routines as standard Reader objects.
## Interface
### Variables
var ErrInvalidKey = errors.New("{{.rname}}: invalid key definition")
### Types
type Reader struct {
// Has unexported fields.
Reader implements {{.rname}} functionality wrapped around an io.Reader object
func NewReader(rd io.Reader) *Reader
NewReader creates a new chunk reader
func (c *Reader) GetErr() error
GetErr returns the error status for the current active {{.rname}} stream
func (c *Reader) GetKey() []byte
GetKey returns the key for the current active {{.rname}} stream
func (c *Reader) Read(p []byte) (int, error)
Read implements the standard Reader interface allowing {{.rname}} to be used
anywhere a standard Reader can be used. Read reads data into p. It returns
the number of bytes read into p. The bytes are taken from at most one Read
on the underlying Reader, hence n may be less than len(p). When the key is
reached (EOF for the stream chunk), the count will be zero and err will be
io.EOF. If the key has been set to nil, the Read function performs exactly
like the underlying stream Read function (no key scanning).
func (c *Reader) Reset()
Reset puts the {{.rname}} stream back into a readable state. This can be used
when the end of a chunk is reached to enable reading the next chunk.
func (c *Reader) SetKey(key []byte) error
SetKey updates the search key. The search key can also be cleared by
providing a nil key.
## Example usage.
import (
func ExampleUppercase() {
example := []byte("the quick {U}brown fox jumps{R} over the lazy dog")
cio := {{.rname}}.NewReader(bytes.NewReader(example))
s1, _ := ioutil.ReadAll(cio)
s2, _ := ioutil.ReadAll(cio)
s3, _ := ioutil.ReadAll(cio)
// Output: the quick BROWN FOX JUMPS over the lazy dog
## Running the tests
$ make check
{{template "rd-contributing" .}}
{{template "rd-versioning" .}}
{{template "rd-license" .}}
{{- /* vim:set ts=4 sw=4 et tw=80: */ -}}