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

fix: repair gnoweb flag parsing #1476

Merged
merged 3 commits into from
Dec 21, 2023
Merged

Conversation

moul
Copy link
Member

@moul moul commented Dec 20, 2023

Before:
CleanShot 2023-12-21 at 00 31 36@2x

After:
CleanShot 2023-12-21 at 00 59 08@2x

Continues #1446


Flag parsing was broken because fs.Parse was expecting to use os.Args[1:] instead of os.Args. I fixed it, simplified the implementation and added a regression test.

Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul moul self-assigned this Dec 20, 2023
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Dec 20, 2023
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (968f89e) 55.87% compared to head (326dc97) 56.09%.

Files Patch % Lines
gno.land/cmd/gnoweb/main.go 53.33% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1476      +/-   ##
==========================================
+ Coverage   55.87%   56.09%   +0.21%     
==========================================
  Files         430      432       +2     
  Lines       65618    65898     +280     
==========================================
+ Hits        36667    36968     +301     
+ Misses      26083    26045      -38     
- Partials     2868     2885      +17     
Flag Coverage Δ
go-1.21.x ∅ <ø> (∅)
misc ∅ <ø> (∅)
misc-_test.genstd ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul moul marked this pull request as ready for review December 21, 2023 00:03
@moul moul requested a review from a team as a code owner December 21, 2023 00:03
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

@thehowl thehowl merged commit d10aa9b into gnolang:master Dec 21, 2023
184 checks passed
gfanton pushed a commit to moul/gno that referenced this pull request Jan 18, 2024
Before:
![CleanShot 2023-12-21 at 00 31
36@2x](https://github.com/gnolang/gno/assets/94029/9587d366-adac-42a1-9527-0b14c97ff89f)

After:
![CleanShot 2023-12-21 at 00 59
08@2x](https://github.com/gnolang/gno/assets/94029/8560bf0c-a145-47a5-b456-80f38479f390)

Continues gnolang#1446

---

Flag parsing was broken because `fs.Parse` was expecting to use
`os.Args[1:]` instead of `os.Args`. I fixed it, simplified the
implementation and added a regression test.

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: No status
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants