def get_target(label):
if not label.startswith("//"):
raise Exception("Expected label to start with //, got %s" % label)
base = label[2:]
separator_index = string.rfind(base, ":")
if separator_index >= 0:
name = base[separator_index+1:]
path = base[:separator_index]
else:
name = base[base.rfind("/")+1:]
path = base
return path, name
# Updates paths in a TOML block.
评论列表
文章目录