help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
go-cli-tool
/
internal
/
ui
RSK World
go-cli-tool
Go CLI Tool v3.0 - Command-Line Interface with File Operations + Text Processing + System Monitoring + Cryptographic Tools + Network Utilities + HTTP Client + Image Processing + Cross-Platform Support + Modern Go Development
ui
  • color.go1.7 KB
color.go
internal/ui/color.go
Raw Download
Find: Go to:
/*
 * Project: Go CLI Tool
 * Category: Go Projects
 * Description: Command-line interface tool built with Go. Features file operations, text processing, command parsing, and system utilities.
 * Author: RSK World
 * Email: support@rskworld.in
 * Website: https://rskworld.in/contact.php
 * Year: 2026
 * Copyright (c) 2026 RSK World. All rights reserved.
 */

package ui

import "fmt"

const (
	Reset  = "\033[0m"
	Bold   = "\033[1m"
	Red    = "\033[31m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
	Blue   = "\033[34m"
	Cyan   = "\033[36m"
	White  = "\033[37m"
)

// PrintWithColor prints text in a specific color.
func PrintWithColor(colorCode, text string) {
	fmt.Printf("%s%s%s", colorCode, text, Reset)
}

// PrintLnWithColor prints text in a specific color with a newline.
func PrintLnWithColor(colorCode, text string) {
	fmt.Printf("%s%s%s\n", colorCode, text, Reset)
}

// Banner prints a stylized banner for the application.
func Banner() {
	PrintLnWithColor(Cyan, "================================================")
	PrintLnWithColor(Cyan, "         🚀 GO CLI TOOL v2.0 - RSK WORLD        ")
	PrintLnWithColor(Cyan, "================================================")
}

// Header prints a section header.
func Header(title string) {
	fmt.Printf("\n%s%s%s\n", Bold+Yellow, title, Reset)
	PrintLnWithColor(Yellow, "---------------------------")
}

// Success prints a success message.
func Success(msg string) {
	PrintLnWithColor(Green, "✔ "+msg)
}

// Error prints an error message.
func Error(msg string) {
	PrintLnWithColor(Red, "✘ Error: "+msg)
}

// Info prints an info message.
func Info(msg string) {
	PrintLnWithColor(Blue, "ℹ "+msg)
}
64 lines•1.7 KB
go

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer