From 40d51e88e95fa579772bb8ff1ffd4234463788de Mon Sep 17 00:00:00 2001 From: ivanbyone Date: Tue, 16 Jun 2026 02:11:22 +0300 Subject: [PATCH 1/3] docs: updated license topic, module file and ci pipe config --- .github/workflows/slugigo.yml | 2 +- go.mod | 2 +- slugigo.go | 9 ++++++++- slugigo_test.go | 7 +++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/slugigo.yml b/.github/workflows/slugigo.yml index 8a0bfbb..4347356 100644 --- a/.github/workflows/slugigo.yml +++ b/.github/workflows/slugigo.yml @@ -1,4 +1,4 @@ -name: Slugigo CI +name: CI on: pull_request: diff --git a/go.mod b/go.mod index 94f2147..c7c3ab2 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/Ivanbyone/slugigo +module github.com/ivanbyone/slugigo go 1.26.4 diff --git a/slugigo.go b/slugigo.go index 3f51bf0..d684141 100644 --- a/slugigo.go +++ b/slugigo.go @@ -1,3 +1,10 @@ +/* +Copyright (c) 2026 Ivan Boyko. + +This source code is licensed under the MIT license found in the +LICENSE file in the root directory of this source tree. +*/ + package slugigo import ( @@ -27,7 +34,7 @@ func Slug(text string) Slugigo { return Slugigo{text: b, separator: "-"} } -// Lowercase +// NoLowercase func (s Slugigo) NoLowercase() Slugigo { s.flags |= flagNoLowercase return s diff --git a/slugigo_test.go b/slugigo_test.go index d6ff880..1664868 100644 --- a/slugigo_test.go +++ b/slugigo_test.go @@ -1,3 +1,10 @@ +/* +Copyright (c) 2026 Ivan Boyko. + +This source code is licensed under the MIT license found in the +LICENSE file in the root directory of this source tree. +*/ + package slugigo import "testing" From 4dea85b61ba2da4f429216e392b27852efda1ae8 Mon Sep 17 00:00:00 2001 From: ivanbyone Date: Tue, 16 Jun 2026 02:12:05 +0300 Subject: [PATCH 2/3] docs: README v0.1.0 --- README.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 535f241..defc360 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,82 @@

slugigo

+

Fast, low-alloc Go slug generator with an elegant Fluent API.

+

- Slugigo License + GH Release + Slugigo CI Status + Slugigo License + Go documentation

+ +## Quick Start + +### Installation + +```bash +go get -u github.com/ivanbyone/slugigo +``` + +### Usage example + +```go +package main + +import ( + "fmt" + "github.com/ivanbyone/slugigo" +) + +func main() { + // Basic usage (ASCII, default compliance RFC-3986) + slug := slugigo.Slug("Hello, Slugigo!").Build() + fmt.Println(slug) + // Output: hello-slugigo + + // Advanced custom configuration + custom := slugigo.Slug("Hello, Fluent Slugigo"). + NoLowercase(). + MaxLength(12). + Separator("_"). + SaveLeadingAndTrailingDash(). + Build() + fmt.Println(custom) + // Output: +} +``` + +## Concept + +Package `slugigo` provides functionality for generating URL-friendly slugs due to standard [RFC-3986](https://datatracker.ietf.org/doc/html/rfc3986). So, default output complies with the following rules: + +* Acceptable `ASCII` characters: + * only lowercase letters: `a-z` + * numbers: `0-9` + * dash: `-` + * underscore: `_` + * dot: `.` +* Default separator: `-` +* Unacceptable leading and trailing dashes. + +You can set custom configuration for use due to your needs. See more in docs. + +## Roadmap + +v0.2.0 + +* Improve library code style +* Add Go benchmarks +* Compile comprehensive documentation +* Key feature: custom replacements with Fluent style + +Stable release + +* Major: Multiple languages transliteration support +* Minor: + * support `Prefix()` & `Suffix()` + * generating dates for slug (`UNIX`, `Datetime`) + * emoji replacements + +## License + +This project is licensed under the terms of the MIT license. See [LICENSE](./LICENSE) file for details. From 00490678d2a4a1c6e03914f5733fe4e6b8de37bc Mon Sep 17 00:00:00 2001 From: ivanbyone Date: Tue, 16 Jun 2026 02:19:46 +0300 Subject: [PATCH 3/3] docs: updated Changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..682a6aa --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Slugigo: Changelog + +## v0.1.0 (2026-06-16) + +### Features + +- First Release +- Default compilance to RFC-3986 URL generation rules +- Support custom configuration for slugs generation + +### Fixes + +None \ No newline at end of file