Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ jobs:
id: changes
run: |
echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
echo "${{ steps.changes.outputs.changes}}"
echo ${{ steps.changes.outputs.changes}}

2 changes: 1 addition & 1 deletion .github/workflows/push_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Get changed files
id: changes
run: |
echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT origin/main origin/${GITHUB_HEAD_REF} | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
release:
runs-on: ubuntu-latest
needs: [release_check]
Expand Down
1 change: 1 addition & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

var (
errDataIsUnexpectedTypeOrNil error = fmt.Errorf("unexpected type or nil")
errOptionAlreadySet error = fmt.Errorf("option already set")
)

func getInvalidJSONData(reason error) error {
Expand Down
3 changes: 2 additions & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func QueryOptions(options *option.QueryOptions) Option {
return OptionFunction(func(selector *Selector) error {
if selector.Options == nil {
selector.Options = options
return nil
}
return nil
return errOptionAlreadySet
})
}
2 changes: 1 addition & 1 deletion options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func Test_QueryOptions(t *testing.T) {
assert.Nil(t, err)

err = option2.Apply(selector)
assert.Nil(t, err)
assert.EqualError(t, err, "option already set")

assert.Equal(t, input1, selector.Options)
assert.NotEqual(t, input2, selector.Options)
Expand Down