-
Notifications
You must be signed in to change notification settings - Fork 34
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
refac: generate Go code to render themes #38
Comments
Hi @matm I don't see generator.go file in pkg/themes/ and we are getting this error github.com/matm/gocov-html/pkg/themes/theme.go:13:5: cannot use defaultTheme{} (type defaultTheme) as type types.Beautifier in assignment: |
Hi @MdSahilGrab, the generator code has been moved to |
Actually we have this command in Dockerfile RUN go get github.com/matm/gocov-html/cmd/gocov-html which we are running when building the code. |
@matm so you want to us to use RUN go get github.com/matm/gocov-html/cmd/generator |
Okay, can you try with the latest stable release instead? Something like RUN go install github.com/matm/gocov-html/cmd/gocov-html@latest |
Yes we tried but this is also not working |
Maybe this can help: https://github.com/matm/gocov-html/blob/master/build.mk#L73 |
What if you do RUN go install github.com/matm/gocov-html/cmd/gocov-html@v1.2.0 |
Let me check |
When we tried this command RUN go install github.com/matm/gocov-html/cmd/gocov-html@latest, we actually got this error. |
Maybe this can help: https://github.com/matm/gocov-html/blob/master/build.mk#L73, |
Can you paste a working sample of your |
@matm yeah this is the Dockerfile we have now which was running successfully till yesterday |
Which Go compiler version is used by this image? |
its golang:1.16-alpine3.14 |
This works: FROM golang:1.16-alpine3.14
RUN go get github.com/axw/gocov/gocov
RUN go get github.com/matm/gocov-html/cmd/gocov-html Then $ docker build -t tool .
$ docker run --rm -ti tool gocov-html -h
Usage of gocov-html:
-d output CSS of default theme
-lt
list available themes
-s string
path to custom CSS file
-t string
theme to use for rendering (default "golang")
-v show program version |
@matm This is what we have in dockerfile but still its failing from yesterday |
Can you try my |
Fetching the latest stable release FROM golang:1.16-alpine3.14
RUN go get github.com/axw/gocov/gocov
RUN go install github.com/matm/gocov-html/cmd/gocov-html@v1.2.0 No error, |
Not sure why its failing, will check internally |
@matm What is the reason not to store generated code in git? |
@obalunenko Actually, I was thinking about it today. Also this would prevent increasing the major version number and keeping the |
v1.3.1 just released and fixes this annoying issue. |
Generating the code for methods
Beautifier.Template()
andBeautifier.Data()
will ease theme management. This wayBeautifer.Assets()
can be used to simply define the required assets to build a theme.Beautifier.Template()
andBeautifier.Data()
for thegolang
(default) themepkg/themes/generator.go
that will generate adefault_gen.go
file implementing those two methods with proper content taken fromAssets()
go generate
before buildingThe text was updated successfully, but these errors were encountered: