1
0
mirror of https://github.com/fatih/color.git synced 2024-11-24 08:02:14 +02:00

Merge pull request #203 from hyunsooda/nilcheck-added

[Test] Nil check added
This commit is contained in:
Fatih Arslan 2023-07-18 16:59:41 +03:00 committed by GitHub
commit d5c210ca2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,6 +405,12 @@ func (c *Color) isNoColorSet() bool {
// Equals returns a boolean value indicating whether two colors are equal.
func (c *Color) Equals(c2 *Color) bool {
if c == nil && c2 == nil {
return true
}
if c == nil || c2 == nil {
return false
}
if len(c.params) != len(c2.params) {
return false
}