veltiosoft / vss

Easy-to-use static site generator
MIT License
33 stars 3 forks source link

Fix/http and log #64

Closed aabril closed 3 months ago

aabril commented 3 months ago

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 commented 3 months ago

@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 commented 3 months ago

formatting fixed

zztkm commented 3 months ago

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