mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-21 23:20:40 +00:00
9 lines
273 B
Rust
9 lines
273 B
Rust
pub(crate) fn connstring(host_port: &str, jwt: Option<&str>) -> String {
|
|
let colon_and_jwt = if let Some(jwt) = jwt {
|
|
format!(":{jwt}") // TODO: urlescape
|
|
} else {
|
|
String::new()
|
|
};
|
|
format!("postgres://postgres{colon_and_jwt}@{host_port}")
|
|
}
|