-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
71 lines (70 loc) · 1.51 KB
/
Copy pathdoc.go
File metadata and controls
71 lines (70 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright 2025 The Tinge Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Package tinge provides a fluent API for creating styled text output in terminal applications.
// It uses lipgloss for styling and offers a chainable interface for building formatted text.
//
// Example usage:
//
// package main
//
// import "github.com/your-username/tinge"
//
// func main() {
// // Basic colored text
// tinge.Styled().
// Green("Hello, ").
// Bold("World!").
// Newline().
// Write()
//
// // Complex formatting with indentation
// tinge.Styled().
// Bold("Project Status:").
// Newline().
// Indent(2).
// Green("✓ ").
// Text("Tests passing").
// Newline().
// Indent(2).
// Red("✗ ").
// Text("Build failed").
// Newline().
// Indent(2).
// Yellow("⚠ ").
// Text("Warnings found").
// Write()
//
// // Using custom styles
// tinge.Styled().
// With(tinge.Blue, tinge.Bold).
// Text("Important notice").
// Space().
// With(tinge.Grey).
// Text("(read carefully)").
// Write()
//
// // Building strings for later use
// message := tinge.Styled().
// Pink("Welcome to ").
// BoldItalic("Tinge").
// Space().
// BlueDark("v1.0.0").
// String()
//
// println(message)
// }
//
// Output examples:
//
// Hello, World!
//
// Project Status:
// ✓ Tests passing
// ✗ Build failed
// ⚠ Warnings found
//
// Important notice (read carefully)
//
// Welcome to Tinge v1.0.0
package tinge