ParseDOidAsInt parses the input and returns it as an OID. If the input is not formatted as an int, an error is returned.
(s string)
| 136 | // ParseDOidAsInt parses the input and returns it as an OID. If the input |
| 137 | // is not formatted as an int, an error is returned. |
| 138 | func ParseDOidAsInt(s string) (*DOid, error) { |
| 139 | i, err := strconv.ParseInt(strings.TrimSpace(s), 0, 64) |
| 140 | if err != nil { |
| 141 | return nil, MakeParseError(s, types.Oid, err) |
| 142 | } |
| 143 | o, err := IntToOid(DInt(i)) |
| 144 | return NewDOid(o), err |
| 145 | } |
| 146 | |
| 147 | // FormatBitArrayToType formats bit arrays such that they fill the total width |
| 148 | // if too short, or truncate if too long. |
no test coverage detected
searching dependent graphs…