mark

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mark 애플리케이션 전반에서 사용되는 이모지 상수를 중앙 관리하는 패키지입니다.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mark

type Mark string

Mark 이모지 상수를 위한 타입입니다.

const (
	// 신규
	New Mark = "🆕"

	// 변경
	Modified Mark = "🔁"

	// 품절/종료
	Unavailable Mark = "🚫"

	// 최저가
	BestPrice Mark = "🔥"

	// 긴급/오류
	Alert Mark = "🚨"
)

func Parse

func Parse(s string) (Mark, error)

Parse 문자열을 Mark 타입으로 변환합니다. 유효하지 않은 마크 문자열인 경우 에러를 반환합니다.

func Values

func Values() []Mark

Values 정의된 모든 마크의 슬라이스 복사본을 반환합니다. 반환된 슬라이스를 수정해도 패키지 내부 상태에는 영향을 주지 않습니다.

func (Mark) IsValid

func (m Mark) IsValid() bool

IsValid 현재 마크가 패키지에 정의된 유효한 마크인지 검증합니다.

func (Mark) String

func (m Mark) String() string

String 마크의 순수 이모지 값을 문자열로 반환합니다.

Example
// String() 메서드나 %s 포맷팅은 순수 값을 반환합니다.
fmt.Println(New)
fmt.Println(Modified.String())
Output:
🆕
🔁

func (Mark) WithSpace

func (m Mark) WithSpace() string

WithSpace 마크 앞에 구분용 공백을 추가하여 반환합니다.

Example
// 1. 표준 마크 사용 (자동 패딩)
fmt.Printf("Title%s\n", New.WithSpace())
fmt.Printf("Price%s\n", BestPrice.WithSpace())

// 2. 빈 마크 사용 (패딩 없음)
empty := Mark("")
fmt.Printf("Empty%s\n", empty.WithSpace())
Output:
Title 🆕
Price 🔥
Empty

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL