roobre/ffxivapi

View on GitHub

Showing 19 of 20 total issues

Function main has 61 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    addr := ":8080"
    if len(os.Args) >= 2 {
        addr = os.Args[1]
    }
Severity: Minor
Found in http/cmd/main.go - About 1 hr to fix

    Method TCacheRoundTripper.RoundTrip has 7 return statements (exceeds 4 allowed).
    Open

    func (trt *TCacheRoundTripper) RoundTrip(rq *http.Request) (response *http.Response, err error) {
        if rq.Method != http.MethodGet {
            return trt.roundTrip(rq)
        }
    
    
    Severity: Major
    Found in lodestone/tcacheRoundTripper.go - About 45 mins to fix

      should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
      Open

              return errors.New(fmt.Sprintf("could not find achievements for %d", c.ID))
      Severity: Minor
      Found in character.go by golint

      exported function NewWithApi should have comment or be unexported
      Open

      func NewWithApi(api *ffxivapi.FFXIVAPI) *Api {
      Severity: Minor
      Found in http/http.go by golint

      type Api should be API
      Open

      type Api struct {
      Severity: Minor
      Found in http/http.go by golint

      exported const FeatureClassJob should have comment (or a comment on this block) or be unexported
      Open

          FeatureClassJob     = 1 << 1
      Severity: Minor
      Found in character.go by golint

      exported type Api should have comment or be unexported
      Open

      type Api struct {
      Severity: Minor
      Found in http/http.go by golint

      exported method HTTPClient.Request should have comment or be unexported
      Open

      func (hlp *HTTPClient) Request(query string) (io.ReadCloser, error) {
      Severity: Minor
      Found in lodestone/lodestone.go by golint

      exported type SearchResult should have comment or be unexported
      Open

      type SearchResult struct {
      Severity: Minor
      Found in search.go by golint

      var urlIdRegex should be urlIDRegex
      Open

      var urlIdRegex = regexp.MustCompile(`/(\d+)/?$`)
      Severity: Minor
      Found in character.go by golint

      exported type TCacheRoundTripper should have comment or be unexported
      Open

      type TCacheRoundTripper struct {
      Severity: Minor
      Found in lodestone/tcacheRoundTripper.go by golint

      exported method TCacheRoundTripper.RoundTrip should have comment or be unexported
      Open

      func (trt *TCacheRoundTripper) RoundTrip(rq *http.Request) (response *http.Response, err error) {
      Severity: Minor
      Found in lodestone/tcacheRoundTripper.go by golint

      exported method FFXIVAPI.Search should have comment or be unexported
      Open

      func (api *FFXIVAPI) Search(characterName string, world string) ([]SearchResult, error) {
      Severity: Minor
      Found in search.go by golint

      func NewWithApi should be NewWithAPI
      Open

      func NewWithApi(api *ffxivapi.FFXIVAPI) *Api {
      Severity: Minor
      Found in http/http.go by golint

      exported const LodestoneHTTPTimeout should have comment or be unexported
      Open

      const LodestoneHTTPTimeout = 20 * time.Second
      Severity: Minor
      Found in lodestone/lodestone.go by golint

      2: cannot find package "github.com/PuerkitoBio/goquery" in any of:
      Open

          "github.com/PuerkitoBio/goquery"
      Severity: Minor
      Found in character.go by govet

      exported function CanonServerFromRegion should have comment or be unexported
      Open

      func CanonServerFromRegion(region string) string {
      Severity: Minor
      Found in lodestone/lodestone.go by golint

      var lastPageUrl should be lastPageURL
      Open

          lastPageUrl, public := doc.Find(".btn__pager__next--all").First().Attr("href")
      Severity: Minor
      Found in character.go by golint

      exported function New should have comment or be unexported
      Open

      func New() *Api {
      Severity: Minor
      Found in http/http.go by golint
      Severity
      Category
      Status
      Source
      Language