Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cache and clean features #337

Merged
merged 4 commits into from
May 19, 2022
Merged

feat: add cache and clean features #337

merged 4 commits into from
May 19, 2022

Conversation

ywanbing
Copy link
Contributor

Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2022

Codecov Report

Merging #337 (c78f8ba) into master (335cd0e) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   33.51%   33.56%   +0.04%     
==========================================
  Files          92       92              
  Lines        6516     6516              
==========================================
+ Hits         2184     2187       +3     
+ Misses       4199     4197       -2     
+ Partials      133      132       -1     
Impacted Files Coverage Δ
pkg/client/grpc/balancer/p2c/least_loaded.go 87.50% <0.00%> (+12.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 335cd0e...c78f8ba. Read the comment docs.

panic(err)
}
} else if err != nil && !os.IsExist(err) {
// 这里的错误,是说明出现了未知的错误,应该抛出
panic(err)
}

Copy link
Member

Choose a reason for hiding this comment

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

已存在的情况,也还需要尝试更新下模板

Copy link
Contributor Author

Choose a reason for hiding this comment

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

如果已经存在,也尝试拉取模板,这缓存不就没有意义了吗?

Copy link
Member

Choose a reason for hiding this comment

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

不然模板会一直不更新呀,可以考虑根据文件变更时间决定,比如超过1天就更新下,pull增量的部分比全量pull还是会快很多

Copy link
Member

Choose a reason for hiding this comment

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

另一个思路是,让用户确认是否更新模板,可以参考oh-my-zsh的玩法 :-)

Copy link
Member

Choose a reason for hiding this comment

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

这样可以不只是更新模板,还可以更新下脚手架本身

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌

cmd/jupiter/internal/cmd/cmd_new.go Show resolved Hide resolved
cmd/jupiter/internal/cmd/cmd.go Outdated Show resolved Hide resolved
@sysulq sysulq changed the title Feat#336 add cache and clean features feat: add cache and clean features May 19, 2022
@sysulq sysulq merged commit e297ae4 into douyu:master May 19, 2022
hjxp pushed a commit to hjxp/jupiter that referenced this pull request May 24, 2022
* feat#336 add cache and clean features

* compatible with windows and Unix

* perfect the content

* add one todo
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