feat(hz): add append_direction into update_behavior#1071
Open
Kevinyyz wants to merge 3 commits intocloudwego:developfrom
Open
feat(hz): add append_direction into update_behavior#1071Kevinyyz wants to merge 3 commits intocloudwego:developfrom
Kevinyyz wants to merge 3 commits intocloudwego:developfrom
Conversation
|
kevinzhang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Contributor
|
感谢 pr,整体没啥问题,先签一个 CLA 吧~ |
Author
FGYFFFF
reviewed
Mar 15, 2024
cmd/hz/generator/custom_files.go
Outdated
| } | ||
| buf := bytes.NewBuffer(nil) | ||
| err = writeBytes(buf, part[0], []byte(tplInfo.UpdateBehavior.AppendLocation), appendContent, part[1]) | ||
| if tplInfo.UpdateBehavior.AppendDirection == "before" { |
Contributor
There was a problem hiding this comment.
可以把 "before" 和 "after" 单独提出来成一个 const 吗? 整体来说没啥问题
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1071 +/- ##
===========================================
+ Coverage 82.79% 82.82% +0.02%
===========================================
Files 98 98
Lines 10032 10032
===========================================
+ Hits 8306 8309 +3
+ Misses 1236 1233 -3
Partials 490 490 ☔ View full report in Codecov by Sentry. |
FGYFFFF
approved these changes
Apr 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What type of PR is this?
Check the PR title.
(Optional) Translate the PR title into Chinese.
添加
append_direction选项到update_behavior中(Optional) More detailed description for this PR(en: English/zh: Chinese).
en: Add the
append_directionoption toupdate_behavior, which controls the position of newly added content relative to the insertion point (before- in front of the insertion point;after- behind the insertion point); default:after.zh(optional): 添加
append_direction选项到update_behavior中,用于控制新增内容追加到插入点的位置(before-在插入点前面;after-在插入点后面;),默认:after(Optional) Which issue(s) this PR fixes:
(Optional) The PR that updates user documentation: