otiai10/opengraph

View on GitHub

Showing 3 of 3 total issues

Method Meta.Contribute has 53 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (meta *Meta) Contribute(og *OpenGraph) (err error) {
    switch {
    case meta.IsTitle():
        og.Title = meta.Content
    case meta.IsOGDescription():
Severity: Minor
Found in meta.go - About 1 hr to fix

    Method OpenGraph.Fetch has 6 return statements (exceeds 4 allowed).
    Open

    func (og *OpenGraph) Fetch() error {
        if og.Intent.URL == "" {
            return fmt.Errorf("no URL given yet")
        }
    
    
    Severity: Major
    Found in opengraph.go - About 40 mins to fix

      Function run has 6 return statements (exceeds 4 allowed).
      Open

      func run(args []string, absolute bool) error {
          if len(args) == 0 {
              return fmt.Errorf("URL must be specified")
          }
          rawurl := args[0]
      Severity: Major
      Found in ogp/main.go - About 40 mins to fix
        Severity
        Category
        Status
        Source
        Language