Skip to content

Commit

Permalink
chore(internal/godocfx): use strconv.Unquote (#3666)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbpg committed Feb 3, 2021
1 parent 3ba9ebc commit c34dbd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/godocfx/parse.go
Expand Up @@ -35,6 +35,7 @@ import (
"os"
"path/filepath"
"sort"
"strconv"
"strings"

"cloud.google.com/go/third_party/pkgsite"
Expand Down Expand Up @@ -585,7 +586,10 @@ func loadPackages(glob, workingDir string) ([]pkgInfo, error) {
if i.Name != nil {
name = i.Name.Name
}
iPath := strings.Trim(i.Path.Value, `"`)
iPath, err := strconv.Unquote(i.Path.Value)
if err != nil {
return nil, fmt.Errorf("strconv.Unquote: %v", err)
}
imports[iPath] = name
}
}
Expand Down

0 comments on commit c34dbd0

Please sign in to comment.