Kanna-Neko / dew

A assistant which can help you test your program you will submit on codeforces And which can create a contest pick problem from codeforces..
MIT License
42 stars 3 forks source link

[Suggestion] Enhance on file embed #2

Closed HydraBor closed 2 years ago

HydraBor commented 2 years ago

For file https://github.com/jaxleof/dew/blob/master/cmd/init.go, you can use https://pkg.go.dev/embed to embed template file, which is normally better for long-term maintainence.

For example

import _ "embed"

//go:embed ../template/cpp.cpp
var defaultCpp string

for

https://github.com/jaxleof/dew/blob/e5ba7b69fcd459597975356fb664f1ba673e08df/cmd/init.go#L17-L54

Kanna-Neko commented 2 years ago

I think less is more, deal with package will waste more time.