<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/ControlProtocolParser/parseSingleLine(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor21ControlProtocolParserO15parseSingleLineyAA0B5ReplyVSSKFZ"
  },
  "title" : "parseSingleLine(_:)"
}
-->

# parseSingleLine(_:)

Convenience: parse exactly one reply line.

```
static func parseSingleLine(_ line: String) throws -> ControlReply
```

## Parameters

`line`

A single reply line as returned by
[`readLine()`](/documentation/Tor/ControlSocket/readLine()).

## Return Value

A [`ControlReply`](/documentation/Tor/ControlReply) with a single entry in
[`lines`](/documentation/Tor/ControlReply/lines).

## Discussion

Wraps [`parseReply(_:)`](/documentation/Tor/ControlProtocolParser/parseReply(_:)) for the common case of a single-line
reply (`"250 OK"`, `"515 Authentication failed"`). Avoids the
array boilerplate at call sites.

> Throws: ``doc://Tor/documentation/Tor/TorError/invalidResponse(_:)`` if the line does
> not parse.