Skip to content

Commit

Permalink
chore: apply code factor (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyul-park authored Dec 1, 2023
1 parent e8eacab commit ccef4fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/code_review.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Uniflow

[![go report][go_report_img]][go_report_url]
[![code coverage][go_code_coverage_img]][go_code_coverage_url]
[![check][repo_check_img]][repo_check_url]
[![code coverage][go_code_coverage_img]][go_code_coverage_url]
[![go report][go_report_img]][go_report_url]
[![codefactor][repo_codefactor_img]][repo_codefactor_url]
[![release][repo_releases_img]][repo_releases_url]

> Low-Code Engine for Backend Workflows
Expand Down Expand Up @@ -92,3 +93,5 @@ Configuration can be done using `.uniflow.toml` or system environment variables.
[repo_wiki_faq_url]: https://github.com/siyul-park/uniflow/wiki/FAQ
[repo_check_img]: https://github.com/siyul-park/uniflow/actions/workflows/check.yml/badge.svg
[repo_check_url]: https://github.com/siyul-park/uniflow/actions/workflows/check.yml
[repo_codefactor_img]: https://www.codefactor.io/repository/github/siyul-park/uniflow/badge
[repo_codefactor_url]: https://www.codefactor.io/repository/github/siyul-park/uniflow
9 changes: 4 additions & 5 deletions cmd/resource/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ func (b *Builder) Build() ([]scheme.Spec, error) {
var e map[string]any
if err := UnmarshalYAMLOrJSON(data, &e); err != nil {
return nil, err
} else {
raws = []map[string]any{e}
}
raws = []map[string]any{e}
}

codec := NewSpecCodec(SpecCodecOptions{
Expand All @@ -78,11 +77,11 @@ func (b *Builder) Build() ([]scheme.Spec, error) {

var specs []scheme.Spec
for _, raw := range raws {
if spec, err := codec.Decode(raw); err != nil {
spec, err := codec.Decode(raw)
if err != nil {
return nil, err
} else {
specs = append(specs, spec)
}
specs = append(specs, spec)
}

return specs, nil
Expand Down

0 comments on commit ccef4fa

Please sign in to comment.