MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / read_token

Function read_token

claw-code/rust/crates/runtime/src/remote.rs:185–198  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

183}
184
185pub fn read_token(path: &Path) -> io::Result<Option<String>> {
186 match fs::read_to_string(path) {
187 Ok(contents) => {
188 let token = contents.trim();
189 if token.is_empty() {
190 Ok(None)
191 } else {
192 Ok(Some(token.to_string()))
193 }
194 }
195 Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(None),
196 Err(error) => Err(error),
197 }
198}
199
200#[must_use]
201pub fn upstream_proxy_ws_url(base_url: &str) -> String {

Callers 1

from_env_mapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected