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/http and log #64

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Fix/http and log #64

merged 3 commits into from
Aug 9, 2024

Conversation

aabril
Copy link

@aabril aabril commented Aug 6, 2024

I was having this couple of errors:

Running in macos / macbook air m3
and v version: V 0.4.7 7baff15.

v run .
commands/serve.v:121:3: warning: field `port` has been deprecated; use addr
  119 |     mut server := &http.Server{
  120 |         handler: handler
  121 |         port: commands.cport
      |         ~~~~~~~~~~~~~~~~~~~~
  122 |     }
  123 |
main.v:21:3: error: cannot access private field `level` on `log.Log`
   19 | fn init_logger() log.Log {
   20 |     return log.Log{
   21 |         level: log.Level.info
      |         ~~~~~~~~~~~~~~~~~~~~~
   22 |     }
   23 | }

Here are the fixes I did to make it work in my local.

@zztkm
Copy link
Member

zztkm commented Aug 7, 2024

@aabril Thanks for creating the PR!

I'll do a code review and my local validation later, but could you please fix the CI error first?

It seems to be a format error, so I think it can be fixed by running the following command and committing it.

v fmt -w .

@aabril
Copy link
Author

aabril commented Aug 7, 2024

formatting fixed

Copy link
Member

@zztkm zztkm left a comment

Choose a reason for hiding this comment

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

@aabril LGTM ! Thank you !

@@ -118,7 +118,7 @@ pub fn (mut s ServeCommand) run() ! {
}
mut server := &http.Server{
handler: handler
port: commands.cport
addr: ':${commands.cport}'
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +19 to +22
fn init_logger() &log.Log {
mut l := log.Log{}
l.set_level(.info)
return &l
Copy link
Member

Choose a reason for hiding this comment

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

@zztkm zztkm merged commit 41d436e into veltiosoft:main Aug 9, 2024
3 checks passed
@zztkm
Copy link
Member

zztkm commented Aug 9, 2024

released : https://github.com/vssio/vss/releases/tag/v0.3.1

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.

2 participants