MCPcopy Create free account
hub / github.com/apache/mesos / parseAuthUrl

Function parseAuthUrl

src/docker/spec.cpp:211–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211string parseAuthUrl(const string& _url)
212{
213 string url = _url;
214 if (strings::startsWith(_url, "http://")) {
215 url = strings::remove(_url, "http://", strings::PREFIX);
216 } else if (strings::startsWith(_url, "https://")) {
217 url = strings::remove(_url, "https://", strings::PREFIX);
218 }
219
220 vector<string> parts = strings::split(url, "/", 2);
221
222 return parts[0];
223}
224
225
226namespace v1 {

Callers 2

foreachpairFunction · 0.85
TEST_FFunction · 0.85

Calls 3

startsWithFunction · 0.85
splitFunction · 0.85
removeFunction · 0.50

Tested by

no test coverage detected