MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dk_env_key

Function dk_env_key

src/pipeline/pass_docker.c:393–403  ·  view source on GitHub ↗

An environment variable name: [A-Za-z_][A-Za-z0-9_.-]*. */

Source from the content-addressed store, hash-verified

391
392/* An environment variable name: [A-Za-z_][A-Za-z0-9_.-]*. */
393static bool dk_env_key(const char *k) {
394 if (!k || !(isalpha((unsigned char)k[0]) || k[0] == '_')) {
395 return false;
396 }
397 for (const char *p = k + SKIP_ONE; *p; p++) {
398 if (!isalnum((unsigned char)*p) && *p != '_' && *p != '.' && *p != '-') {
399 return false;
400 }
401 }
402 return strlen(k) < CBM_SZ_256;
403}
404
405int64_t cbm_pipeline_env_setter(cbm_pipeline_ctx_t *ctx, const cbm_gbuf_node_t *owner,
406 const char *container, const char *key, const char *source,

Callers 1

cbm_pipeline_env_setterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected