(content string, line, column int)
| 283 | } |
| 284 | |
| 285 | func ConvertToHCLPosition(content string, line, column int) hcl.Pos { |
| 286 | lines := strings.Split(content, "\n") |
| 287 | offset := 0 |
| 288 | for i := range line { |
| 289 | offset += len(lines[i]) + 1 |
| 290 | } |
| 291 | offset += column |
| 292 | return hcl.Pos{Line: line + 1, Column: column + 1, Byte: offset} |
| 293 | } |
no outgoing calls