Skip to content

Commit

Permalink
Fixing linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed May 6, 2024
1 parent 216583d commit fce3b49
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[run]
timeout = "120s"

[output]
format = "colored-line-number"

[linters]
enable = [
"gocyclo", "unconvert", "goimports", "unused", "unused",
"vetshadow", "nakedret", "errcheck", "revive", "ineffassign",
"goconst", "vet", "unparam", "gofmt"
]

[issues]
exclude-use-default = false

1 change: 1 addition & 0 deletions cmd/gobl.html/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package main provides the entry point for the gobl.html command-line tool.
package main

import (
Expand Down
2 changes: 1 addition & 1 deletion cmd/gobl.html/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *serveOpts) cmd() *cobra.Command {
return cmd
}

func (s *serveOpts) runE(cmd *cobra.Command, args []string) error {
func (s *serveOpts) runE(cmd *cobra.Command, _ []string) error {
ctx, cancel := context.WithCancel(cmd.Context())
defer cancel()

Expand Down
2 changes: 2 additions & 0 deletions components/bill/invoice/invoice.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package invoice provides a template for rendering a complete GOBL bill.Invoice object.
package invoice
3 changes: 3 additions & 0 deletions components/org/org.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package org helps render organization information from the
// GOBL `org` package.
package org
1 change: 1 addition & 0 deletions goblhtml.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package goblhtml provides a simple way to render HTML documents from GOBL envelopes.
package goblhtml

import (
Expand Down
1 change: 1 addition & 0 deletions internal/options.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package internal is used for internal option configuration.
package internal

import (
Expand Down
2 changes: 1 addition & 1 deletion pkg/pdf/gotenberg.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newGotenbergConvertor(opts ...Config) (*gotenbergConvertor, error) {
return gc, nil
}

func (gc *gotenbergConvertor) HTML(ctx context.Context, data []byte, opts ...Option) ([]byte, error) {
func (gc *gotenbergConvertor) HTML(_ context.Context, data []byte, _ ...Option) ([]byte, error) {
buf := bytes.NewBuffer(data)
resp, err := gc.client.R().
SetFileReader("files", "index.html", buf).
Expand Down
2 changes: 1 addition & 1 deletion pkg/pdf/prince.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func newPrinceConvertor() (*princeConvertor, error) {
return c, nil
}

func (pc *princeConvertor) HTML(ctx context.Context, data []byte, opts ...Option) ([]byte, error) {
func (pc *princeConvertor) HTML(_ context.Context, data []byte, opts ...Option) ([]byte, error) {
o := prepareOptions(opts)
j := new(princepdf.Job)
j.Input = &princepdf.Input{
Expand Down
2 changes: 1 addition & 1 deletion pkg/pdf/weasyprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func newWeasyprintConvertor(opts ...Config) (*weasyprintConvertor, error) {
return gc, nil
}

func (gc *weasyprintConvertor) HTML(ctx context.Context, data []byte, opts ...Option) ([]byte, error) {
func (gc *weasyprintConvertor) HTML(_ context.Context, data []byte, _ ...Option) ([]byte, error) {
buf := bytes.NewBuffer(data)
resp, err := gc.client.R().
SetFileReader("html", "index.html", buf).
Expand Down

0 comments on commit fce3b49

Please sign in to comment.