feat: 支持inpackage/keeptree/output参数 · Issue #1 · sysulq/struct2interface · GitHub
Skip to content

feat: 支持inpackage/keeptree/output参数 #1

Open

Description

@sysulq

Activity

  1. sysulq commented on May 24, 2022

    @sysulq
    OwnerAuthor

    @x1nchen 有空的话,可以帮忙实现一下这个功能,方便指定interface代码的生成目录 :-)

  2. x1nchen commented on May 24, 2022

    @x1nchen
    Contributor

    OK 我先看看参考资料 :-)

  3. x1nchen commented on May 25, 2022

    @x1nchen
    Contributor

    @hnlq715 整理了一下这三个参数的的作用和使用规则,劳烦有空的时候确认下是否是这个逻辑

    参数作用

    output:指定生成 interface 源文件的保存的目录
    inpackage:生成的 interface 源文件保存在对应的结构体的包内
    keeptree:生成的 interface 源文件所在的目录将和对应的结构体的目录保持一致(可能会在不同的根目录内)

    注:--output . --keeptree 这两个参数同时如此使用和单独使用 --inpackage 产生的结果相同

    参数同时使用的基本规则

    1. output、inpackage 和 keeptree 可以同时使用
    2. output 和 inpackage 同时使用时,output 参数优先级更高,inpackage 参数将失效
    3. inpackage 和 keeptree 同时使用时,keeptree 参数优先级更高,inpackage 参数将失效
  4. sysulq commented on May 25, 2022

    @sysulq
    OwnerAuthor

    嗯,目前实现的就是--inpackage的效果,output和keeptree一般是结合起来使用的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions