gpt4 book ai didi

go - 如何在 golang 中从 Gherkin 数据表中输入 bool 值?

转载 作者:行者123 更新时间:2023-12-01 22:25:54 24 4
gpt4 key购买 nike

我有一个输入 Gherkin DataTable,其中一列中有 bool 值,当我读取 DataTable 时, bool 值被转换为字符串。我的最终目标是以 json 格式从 DataTable 读取的数据作为 API 的主体发送。我怎样才能做到这一点?

最佳答案

当我在寻找答案时,我发现辅助狗没有 bool 解析器的实现。因此,为了实现这一点,我编写了一个 bool 解析器,它简单地将传入的字符串转换为 bool 值,并将解析器注册到 AssistDog.go 文件中的默认解析器下。
我写这个答案是为了帮助别人或作为 future 的引用。

关于go - 如何在 golang 中从 Gherkin 数据表中输入 bool 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59980574/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com