• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13035292482

29 Jan 2025 03:59PM UTC coverage: 49.3% (-9.5%) from 58.777%
13035292482

Pull #9456

github

mohamedawnallah
docs: update release-notes-0.19.0.md

In this commit, we warn users about the removal
of RPCs `SendToRoute`, `SendToRouteSync`, `SendPayment`,
and `SendPaymentSync` in the next release 0.20.
Pull Request #9456: lnrpc+docs: deprecate warning `SendToRoute`, `SendToRouteSync`, `SendPayment`, and `SendPaymentSync` in Release 0.19

100634 of 204126 relevant lines covered (49.3%)

1.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/lncfg/color.go
1
package lncfg
2

3
import (
4
        "encoding/hex"
5
        "errors"
6
        "image/color"
7
        "regexp"
8
)
9

10
var (
11
        // validColorRegexp is a regexp that lets you check if a particular
12
        // color string matches the standard hex color format #RRGGBB.
13
        validColorRegexp = regexp.MustCompile("^#[A-Fa-f0-9]{6}$")
14
)
15

16
// ParseHexColor takes a hex string representation of a color in the
17
// form "#RRGGBB", parses the hex color values, and returns a color.RGBA
18
// struct of the same color.
19
func ParseHexColor(colorStr string) (color.RGBA, error) {
3✔
20
        // Check if the hex color string is a valid color representation.
3✔
21
        if !validColorRegexp.MatchString(colorStr) {
3✔
22
                return color.RGBA{}, errors.New("color must be specified " +
×
23
                        "using a hexadecimal value in the form #RRGGBB")
×
24
        }
×
25

26
        // Decode the hex color string to bytes.
27
        // The resulting byte array is in the form [R, G, B].
28
        colorBytes, err := hex.DecodeString(colorStr[1:])
3✔
29
        if err != nil {
3✔
30
                return color.RGBA{}, err
×
31
        }
×
32

33
        return color.RGBA{R: colorBytes[0], G: colorBytes[1], B: colorBytes[2]}, nil
3✔
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc