Skip to content

Releases: svengreb/golib

0.1.0

21 Nov 09:09
v0.1.0
Compare
Choose a tag to compare

Release Date: 2020-11-21 Project Board Milestone

Show all commits

This is the initial release version of golib.
The basic project setup, structure and development workflow has been bootstrapped by the base tmpl-go template repository.
Any additional change is covered in the following sections of this version changelog to introduce features, used technologies and explain why several decisions have been made.

Features

Bootstrapped project based on tmpl-go template repository#1 (⊶ eb0b5be)

↠ The basic project setup, structure and development workflow has been bootstrapped from version 0.5.0 of the tmpl-go template repository.
Additionally specific assets like the repository hero image have been replaced and documentations like the README and GitHub issue/PR templates are adjusted.

"io/fs" package: I/O utility functions for filesystem interactions#3#4 (⊶ d1c7cc2)

↠ The standard library provides the io/ioutil package that simplifies some common tasks like reading all data from a file and many more useful functions.

To simplify common I/O tasks related to interacting with filesystems, golib provides the io/fs package:

  • DirExists(string) (bool, error) — checks if a directory exists.
  • FileExists(string) (bool, error) — checks if a regular file or directory exists.
  • IsFileWritable(string) (bool, error) — checks if a file is writable.
  • IsSymlink(string) (bool, error) — checks if a file is a symbolic link.
  • RegularFileExists(string) (bool, error) — checks if a regular file exists.

The package makes use of the underlying filesystem and only serves as additional utility for the os Go standard library package. For more advanced and extended features see packages like github.com/spf13/afero instead.

"io/fs/filepath" package: utility functions for filename path#5#6 (⊶ 008c997)

↠ The standard library provides the path/filepath package that simplifies some common filesystem path handling tasks like glob pattern matching and many more useful functions.

golib provides the io/fs/filepath package that extends the filepath package with more utilities.
For more advanced and extended features see packages like github.com/spf13/afero instead.
Please note that some functions will interact with the underlying filesystem through on-disk operations!

  • IsSubDir(parentPath, subPath string, evalSymlinks bool) (bool, error) — checks if a path is a subdirectory of another path.
"vcs/git" package: VCS utility functions to interact with Git repositories#8#9 (⊶ d21a699)

↠ In order to simplify interactions with various version control systems, the vcs/git package provides utility functions for Git repositories.

It makes use of the github.com/go-git/go-git/v5 module, a highly extensible Git implementation in pure Go, instead of just trying to use the Git binary executable that may have been installed on the current system.
The github.com/Masterminds/semver/v3 module is used to provide a stable and flexible way to work with “Semantic Versions“.

Initial project documentation#7#10 (⊶ 41126f1)

↠ Wrote the initial project documentation that includes…

  1. …an project introduction and motivation.
  2. …an overview of the module packages.
  3. …information about how to contribute to this project.

The full changelog is available here