Skip to content

Conversation

fengjx
Copy link
Contributor

@fengjx fengjx commented Feb 9, 2020

local prefix_v3 = {
    ["3.5."] = "/v3",
    ["3.4."] = "/v3",
    ["3.3."] = "/v3beta",
    ["3.2."] = "/v3alpha",
}

function _M.has_value(arr, val)
    for index, value in ipairs(arr) do
        if value == val then
            return index
        end
    end

    return false
end

prefix_v3 length is 0, so has_value method always return false

@claassistantio
Copy link

claassistantio commented Feb 9, 2020

CLA assistant check
All committers have signed the CLA.

end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style: this 4 space is useless, please remove it.

Copy link
Contributor

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we can merge it later

@fengjx
Copy link
Contributor Author

fengjx commented Feb 20, 2020

another commit fix: #50

@membphis membphis merged commit 544588b into api7:master Feb 20, 2020
@membphis
Copy link
Contributor

@fengjx merged, many thx

wfnuser pushed a commit to wfnuser/lua-resty-etcd that referenced this pull request Dec 15, 2020
* fix: has_value method always return false

* 1. fix v3.watchdir() opts args type error (api7#50)
2. fix prev_kv not decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants