Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ee11c3c
chore: markdown consistency changes
synesissoftware Aug 2, 2026
a7eb958
chore: LICENSE update
synesissoftware Aug 2, 2026
9e7f543
.gitattributes
synesissoftware Aug 2, 2026
15e1072
.gitignore
synesissoftware Aug 2, 2026
ab9ca57
.sis identities
synesissoftware Aug 3, 2026
bb636a9
CI
synesissoftware Aug 3, 2026
60e1c3e
chore: helper scripts
synesissoftware Aug 3, 2026
ef6747c
chore: **README.md**: badges and tag line
synesissoftware Aug 3, 2026
bb2e9e1
chore: boilerplate
synesissoftware Aug 3, 2026
f71e520
CI
synesissoftware Aug 3, 2026
3274c72
chore: standardising .vscode/settings.json
synesissoftware Aug 3, 2026
5260c1c
Reorder README.md so Table of Contents precedes Introduction
synesissoftware Aug 19, 2026
72263f0
Set go.mod minimum to Go 1.21.
synesissoftware Aug 19, 2026
d95c3f1
docs: add AUTHORS.md
synesissoftware Aug 19, 2026
3b83ffe
docs: flesh out NEWS.md
synesissoftware Aug 19, 2026
4c2f712
docs: canonicalise TODO.md
synesissoftware Aug 19, 2026
3dfe0df
docs: canonicalise EXAMPLES.md and companion example docs
synesissoftware Aug 19, 2026
5ba777f
ci: align Go workflow push branches to Synesis order
synesissoftware Aug 19, 2026
3b38804
ci: add golangci-lint and tier-aware Go matrix to go.yml
synesissoftware Aug 19, 2026
ff63691
docs: note pre-release go.mod tidy order in TODO.md
synesissoftware Aug 19, 2026
6ccd2ed
docs: normalise CHANGES.md version headings to SemVer form
synesissoftware Aug 19, 2026
63021ff
release: prepare libCLImate.Go 0.8.2 (Version API + Synesis deps)
synesissoftware Aug 20, 2026
da879e2
Merge branch 'master' into 'idiomatic'
synesissoftware Aug 20, 2026
eb5014b
fix
synesissoftware Aug 20, 2026
6128b8f
fix
synesissoftware Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@

#
# Created: 18th August 2025
# Updated: 3rd August 2026
# Updated: 19th August 2026
#

name: Go

env:
GO_MIN_VERSION: '1.21'
VERBOSITY: 1

on:
push:
branches:
- boilerplate
- master
- dev
- boilerplate
- idiomatic
- master
- rc1
- rc2
- rc3
Expand Down Expand Up @@ -65,3 +66,20 @@ jobs:

- name: "Run all unit-tests"
run: ./run_all_unit_tests.sh --verbosity ${{ env.VERBOSITY }}

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: "Set up Go ${{ env.GO_MIN_VERSION }}"
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_MIN_VERSION }}'

- name: "Run golangci-lint"
uses: golangci/golangci-lint-action@v6
with:
args: --fast
verify: false
16 changes: 16 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
linters:
enable:
- gci

linters-settings:
gci:
custom-order: true
no-inline-comments: false
no-prefix-comments: false
sections:
- prefix(github.com/synesissoftware/libCLImate.Go)
- default
- standard

run:
timeout: 5m
22 changes: 22 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# libCLImate.Go - Authors <!-- omit in toc -->


## Major Contributors

| Name | Email | GitHub |
| ------------ | ------------------------------------ | --------------------------------- |
| Matt Wilson | matthew.wilson.synesis@gmail.com | [mwsis](https://github.com/mwsis) |
| Harry Wilson | harold.wilson.synesis@gmail.com | [Hazzoz](https://github.com/Hazzoz) |


## Defect reports, fixes and suggestions (for which we are very grateful)

| Name | GitHub |
| ------- | ------ |
| \<none> | |


Contributions are welcomed.


<!-- ########################### end of file ########################### -->
23 changes: 20 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# libCLImate.Go - CHANGES <!-- omit in toc -->
# libCLImate.Go - Changes <!-- omit in toc -->


## 0.8.2-beta-1 - 18th August 2025
## 0.8.2 - 20th August 2026

* added **Version()** (replacing the **Version** constant), formed by **ver2go.CombineVersion()**;
* documented **VersionString()**;
* **VersionAB** now uses **ver2go.Release**;
* updated **ver2go** to 0.2.0-beta1;
* updated **ANGoLS** to 0.11.0;
* updated **CLASP.Go** to 0.18.0;
* updated **test/scratch/libver.go** to use **VersionString()**;
* CI modernisation (matrix + lint);
* fixed **golangci-lint** issues in **climate.go** (**ineffassign**) and **test/scratch/libver.go** (**gci**);
* CI reliability fixes (macOS test linking; golangci-lint config verification disabled in CI);
* boilerplate additions (scripts, markdown docs, project identity);
* removed retired Go Report Card badge from README;
* version string updated for the 0.8.2 release;


## 0.8.2-beta1 - 18th August 2025

* GitHub Actions;
* `interface{}` => `any`;
Expand All @@ -14,7 +31,7 @@
* + further application of `UsageHelpSuffix` to various contingent reports, and now operative by default;


## 0.8.0-beta-1 - 4th March 2025
## 0.8.0-beta1 - 4th March 2025

* + added `UsageHelpSuffix`;

Expand Down
16 changes: 9 additions & 7 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# libCLImate.Go - Examples <!-- omit in toc -->

|Name|Source & Description|Summary|
|---|---|---|
|**show_usage_and_version**|[examples/show_usage_and_version.go](/examples/show_usage_and_version.go)<br/>[examples/show_usage_and_version.md](/examples/show_usage_and_version.md)|Simple example supporting ```--help``` and ```--version```|
|**flag_and_option_specifications**|[examples/flag_and_option_specifications.go](/examples/flag_and_option_specifications.go)<br/>[examples/flag_and_option_specifications.md](/examples/flag_and_option_specifications.md)|Example illustrating various kinds of *flag* and *option* specifications|
|**parse_and_verify**|[examples/parse_and_verify.go](/examples/parse_and_verify.go)<br/>[examples/parse_and_verify.md](/examples/parse_and_verify.md)|Example providing same functionality as the **flag_and_option_specifications** example but with ``ParseAndVerify()`` method|
|**bit_flags**|[examples/bit_flags.go](/examples/bit_flags.go)<br/>[examples/bit_flags.md](/examples/bit_flags.md)|Example illustrating assocation of flag specifications with bit flags and (optionally) a receiver variable, thus simplifying the command-line handling code|

| Name | Source & Description | Summary |
| ---------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **bit_flags** | [examples/bit_flags.go](./examples/bit_flags.go)<br/>[examples/bit_flags.md](./examples/bit_flags.md) | Example illustrating association of flag specifications with bit flags and (optionally) a receiver variable, thus simplifying the command-line handling code |
| **flag_and_option_specifications** | [examples/flag_and_option_specifications.go](./examples/flag_and_option_specifications.go)<br/>[examples/flag_and_option_specifications.md](./examples/flag_and_option_specifications.md) | Example illustrating various kinds of *flag* and *option* specifications |
| **parse_and_verify** | [examples/parse_and_verify.go](./examples/parse_and_verify.go)<br/>[examples/parse_and_verify.md](./examples/parse_and_verify.md) | Example providing same functionality as the **flag_and_option_specifications** example but with `ParseAndVerify()` method |
| **README_Components** | [examples/README_Components.go](./examples/README_Components.go)<br/>[examples/README_Components.md](./examples/README_Components.md) | Example matching the README Components section |
| **show_usage_and_version** | [examples/show_usage_and_version.go](./examples/show_usage_and_version.go)<br/>[examples/show_usage_and_version.md](./examples/show_usage_and_version.md) | Simple example supporting `--help` and `--version` |
| **values** | [examples/values.go](./examples/values.go)<br/>[examples/values.md](./examples/values.md) | Illustrates the handling of `Values` |

<!-- ########################### end of file ########################### -->

<!-- ########################### end of file ########################### -->
29 changes: 29 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# libCLImate.Go - News <!-- omit in toc -->


| Date | News Item |
| ------------------ | --------------------------------------------------------------------------------------------------------------------- |
| 20th August 2026 | Release of [**libCLImate.Go** 0.8.2](https://github.com/synesissoftware/libCLImate.Go/releases/tag/0.8.2) |
| 18th August 2025 | Release of [**libCLImate.Go** 0.8.2-beta1](https://github.com/synesissoftware/libCLImate.Go/releases/tag/0.8.2-beta1) |
| 12th March 2025 | Release of **libCLImate.Go** 0.8.1 |
| 4th March 2025 | Release of **libCLImate.Go** 0.8.0-beta1 |
| 4th March 2025 | Release of **libCLImate.Go** 0.8.0-alpha1 |
| 4th March 2025 | Release of **libCLImate.Go** 0.7.0-alpha3 |
| 28th February 2025 | Release of **libCLImate.Go** 0.7.0-alpha2 |
| 28th February 2025 | Release of **libCLImate.Go** 0.7.0-alpha1 |
| 28th February 2025 | Release of **libCLImate.Go** 0.6.1-alpha5 |
| 28th February 2025 | Release of **libCLImate.Go** 0.6.1-alpha4 |
| 26th February 2025 | Release of **libCLImate.Go** 0.6.1-alpha3 |
| 25th February 2025 | Release of **libCLImate.Go** 0.6.1-alpha2 |
| 24th February 2025 | Release of **libCLImate.Go** 0.6.1-alpha1 |
| 10th April 2019 | Release of **libCLImate.Go** 0.6.0 |
| 8th April 2019 | Release of **libCLImate.Go** 0.5.0 |
| 30th March 2019 | Release of **libCLImate.Go** 0.4.2 |
| 29th March 2019 | Release of **libCLImate.Go** 0.4.1 |
| 29th March 2019 | Release of **libCLImate.Go** 0.4.0 |
| 28th March 2019 | Release of **libCLImate.Go** 0.3.0 |
| 25th March 2019 | Release of **libCLImate.Go** 0.2.0 |
| 23rd March 2019 | Release of **libCLImate.Go** 0.1.0 |


<!-- ########################### end of file ########################### -->
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@
[![GitHub release](https://img.shields.io/github/v/release/synesissoftware/libCLImate.Go.svg)](https://github.com/synesissoftware/libCLImate.Go/releases/latest)
[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/libCLImate.Go)](https://github.com/synesissoftware/libCLImate.Go/commits/master)
[![Go](https://github.com/synesissoftware/libCLImate.Go/actions/workflows/go.yml/badge.svg)](https://github.com/synesissoftware/libCLImate.Go/actions/workflows/go.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/synesissoftware/libCLImate.Go)](https://goreportcard.com/report/github.com/synesissoftware/libCLImate.Go)
[![Go Reference](https://pkg.go.dev/badge/github.com/synesissoftware/libCLImate.Go.svg)](https://pkg.go.dev/github.com/synesissoftware/libCLImate.Go)


## Introduction

**libCLImate** is a **C**ommand-**L**ine **I**nterface boilerplate
mini-framework, which encapsulates the common aspects of Command-Line
Interface boilerplate. The first
[libCLImate was a C/C++ library](https://github.com/synesissoftware/libCLImate/).
There have been several implementations in other languages. **libCLImate.Go** is the
**Go** version.


## Table of Contents <!-- omit in toc -->

- [Introduction](#introduction)
Expand All @@ -37,6 +26,16 @@ There have been several implementations in other languages. **libCLImate.Go** is
- [License](#license)


## Introduction

**libCLImate** is a **C**ommand-**L**ine **I**nterface boilerplate
mini-framework, which encapsulates the common aspects of Command-Line
Interface boilerplate. The first
[libCLImate was a C/C++ library](https://github.com/synesissoftware/libCLImate/).
There have been several implementations in other languages. **libCLImate.Go** is the
**Go** version.


## Background

As described in the [**CLASP**](https://github.com/synesissoftware/CLASP) project, command-line arguments may be discriminated as **flags**, **options**, and **values**:
Expand Down Expand Up @@ -226,7 +225,7 @@ Defect reports, feature requests, and pull requests are welcome on https://githu

#### Development/Testing Dependencies

* [**testify**](github.com/stretchr/testify);
* [**testify**](https://github.com/stretchr/testify);
* [**ANGoLS**](https://github.com/synesissoftware/ANGoLS/);


Expand Down
21 changes: 18 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# libCLImate.Go - TODO <!-- omit in toc -->


## **libCLImate.Go** 0.6.x TODOs:
## Table of Contents <!-- omit in toc -->

- [Functional improvements](#functional-improvements)
- [Performance improvements](#performance-improvements)
- [Packaging improvements](#packaging-improvements)


## Functional improvements

* [ ] a "require" property for flags/options;
* [ ] verification of option values (constraining to type and/or range-of-values);
* [ ] allow succinct values, a la **libCLImate.Ruby**, e.g. `"--verbosity"` (alias `"-v"`) values range `[]string{ "[s]ilent", "[t]erse", "[n]ormal, "[c]hatty", "[v]erbose" }`, allowing for option `"-v c"`;


## libCLImate 0.7+ TODOs:
## Performance improvements

* \<none>


<!-- ########################### end of file ########################### -->
## Packaging improvements

* [ ] Before the next official release: confirm **`go.mod`** (`go 1.21`) and the CI Go-version matrix, bump Synesis `require`s to newly published tags, then run **`go mod tidy`** (not against currently published tags). Prior Synesis Go releases, in order:
* **ver2go**;
* **STEGoL**;
* **ANGoLS**;
* **CLASP.Go**;


<!-- ########################### end of file ########################### -->
3 changes: 2 additions & 1 deletion abort_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package libclimate_test

import (
"github.com/stretchr/testify/require"
libclimate "github.com/synesissoftware/libCLImate.Go"
"github.com/synesissoftware/libCLImate.Go/internal"

"github.com/stretchr/testify/require"

"bytes"
"errors"
"fmt"
Expand Down
3 changes: 2 additions & 1 deletion api_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package libclimate_test

import (
"github.com/stretchr/testify/require"
libclimate "github.com/synesissoftware/libCLImate.Go"

"github.com/stretchr/testify/require"

"testing"
)

Expand Down
11 changes: 4 additions & 7 deletions climate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

/*
* Created: 22nd March 2019
* Updated: 18th August 2025
* Updated: 20th August 2026
*/

package libclimate

import (
clasp "github.com/synesissoftware/CLASP.Go"
"github.com/synesissoftware/libCLImate.Go/internal"

clasp "github.com/synesissoftware/CLASP.Go"

"fmt"
"io"
"os"
Expand Down Expand Up @@ -537,7 +538,6 @@ func (result Result) validateValues2(stream io.Writer, min, max int) {
// the specified flags and options
func (result Result) Verify(options ...any) {

var err error
var parseFlags ParseFlag

stream, _ := parse_Stream_from_options_(options...)
Expand All @@ -550,10 +550,7 @@ func (result Result) Verify(options ...any) {
stream = os.Stderr
}

if err == nil {

parseFlags, err = parse_ParseFlags_from_options_(options...)
}
parseFlags, _ = parse_ParseFlags_from_options_(options...)
parseFlags |= result.parseFlags

if 0 == (ParseFlag_DontCheckUnused & parseFlags) {
Expand Down
15 changes: 15 additions & 0 deletions examples/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
linters:
enable:
- gci

linters-settings:
gci:
custom-order: true
no-inline-comments: false
no-prefix-comments: false
sections:
- default
- standard

run:
timeout: 5m
21 changes: 21 additions & 0 deletions examples/README_Components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# libCLImate.Go - Example - **README_Components**


## Summary

Example matching the README Components section.


## Source

See [examples/README_Components.go](./examples/README_Components.go).


## Execution

```bash
go run ./examples/README_Components.go
```


<!-- ########################### end of file ########################### -->
3 changes: 1 addition & 2 deletions examples/bit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
package main

import (
"fmt"

clasp "github.com/synesissoftware/CLASP.Go"
libclimate "github.com/synesissoftware/libCLImate.Go"

"fmt"
"os"
)

Expand Down
7 changes: 3 additions & 4 deletions examples/bit_flags.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# libCLImate.Go Example - **bit_flags**
# libCLImate.Go - Example - **bit_flags**

## Summary

Expand All @@ -12,11 +12,10 @@ Example illustrating assocation of flag specifications with bit flags and (optio
package main

import (
"fmt"

clasp "github.com/synesissoftware/CLASP.Go"
clasp "github.com/synesissoftware/CLASP.Go"
libclimate "github.com/synesissoftware/libCLImate.Go"

"fmt"
"os"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/flag_and_option_specifications.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# libCLImate.Go Example - **flag_and_option_specifications**
# libCLImate.Go - Example - **flag_and_option_specifications**

## Summary

Expand Down
Loading
Loading