mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-21 21:30:50 +01:00
Improve documentation for String methods
Enhanced comments for String methods on Charset, ContentType, and Encoding types. Detailed the purpose and usage of each method, emphasizing their role in formatted output and logging.
This commit is contained in:
parent
2c1082fe42
commit
dab9cc947a
1 changed files with 24 additions and 4 deletions
28
encoding.go
28
encoding.go
|
@ -184,18 +184,38 @@ const (
|
||||||
MIMERelated MIMEType = "related"
|
MIMERelated MIMEType = "related"
|
||||||
)
|
)
|
||||||
|
|
||||||
// String satisfies the fmt.Stringer interface for the Charset type. It converts a Charset into a printable format.
|
// String satisfies the fmt.Stringer interface for the Charset type.
|
||||||
|
// It converts a Charset into a printable format.
|
||||||
|
//
|
||||||
|
// This method returns the string representation of the Charset, allowing it to be easily
|
||||||
|
// printed or logged.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// - A string representation of the Charset.
|
||||||
func (c Charset) String() string {
|
func (c Charset) String() string {
|
||||||
return string(c)
|
return string(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// String satisfies the fmt.Stringer interface for the ContentType type. It converts a ContentType into a printable
|
// String satisfies the fmt.Stringer interface for the ContentType type.
|
||||||
// format.
|
// It converts a ContentType into a printable format.
|
||||||
|
//
|
||||||
|
// This method returns the string representation of the ContentType, enabling its use
|
||||||
|
// in formatted output such as logging or displaying information to the user.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// - A string representation of the ContentType.
|
||||||
func (c ContentType) String() string {
|
func (c ContentType) String() string {
|
||||||
return string(c)
|
return string(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// String satisfies the fmt.Stringer interface for the Encoding type. It converts an Encoding into a printable format.
|
// String satisfies the fmt.Stringer interface for the Encoding type.
|
||||||
|
// It converts an Encoding into a printable format.
|
||||||
|
//
|
||||||
|
// This method returns the string representation of the Encoding, which can be used
|
||||||
|
// for displaying or logging purposes.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// - A string representation of the Encoding.
|
||||||
func (e Encoding) String() string {
|
func (e Encoding) String() string {
|
||||||
return string(e)
|
return string(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue