Spelling
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-01-17 12:06:36 -08:00
parent 4353143ae4
commit dfae5b9261
1 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ func (tp *torProvider) GetInfo(onion string) (map[string]string, error) {
circuits, streams, err := getCircuitInfo(tp.t.Control)
if err == nil {
var cirucitID string
var circuitID string
for _, stream := range streams {
if stream.Key == "stream-status" {
lines := strings.Split(stream.Val, "\n")
@ -106,7 +106,7 @@ func (tp *torProvider) GetInfo(onion string) (map[string]string, error) {
// StreamID SP StreamStatus SP CircuitID SP Target CRLF
if len(parts) == 4 {
if strings.HasPrefix(parts[3], onion) {
cirucitID = parts[2]
circuitID = parts[2]
break
}
}
@ -114,7 +114,7 @@ func (tp *torProvider) GetInfo(onion string) (map[string]string, error) {
}
}
if cirucitID == "" {
if circuitID == "" {
return nil, errors.New("could not find circuit")
}
@ -126,7 +126,7 @@ func (tp *torProvider) GetInfo(onion string) (map[string]string, error) {
parts := strings.Split(line, " ")
// CIRCID SP STATUS SP PATH...
if len(parts) >= 3 && cirucitID == parts[0] {
if len(parts) >= 3 && circuitID == parts[0] {
//log.Debugf("Found Circuit for Onion %v %v", onion, parts)
if parts[1] == "BUILT" {
circuitPath := strings.Split(parts[2], ",")