Class GoPathContext

java.lang.Object
org.sonar.go.coverage.GoPathContext

public class GoPathContext extends Object
  • Field Details

  • Constructor Details

    • GoPathContext

      public GoPathContext(char fileSeparator, String pathSeparator, @Nullable String goPath)
  • Method Details

    • resolve

      public String resolve(String filePath)
      Try to resolve the absolute path of the given filePath. If filePath is absolute (start with _) return the absolute path without the '_'. If filePath is relative, try to append the first GOPATH entry where this file exists, otherwise return a non-existing absolute path using the first GOPATH entry (or just filePath itself if GOPATH is empty). See GoCoverSensor.findInputFile(String, FileSystem)