build_target.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:build 作者: fuchsia-mirror 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号