diff --git a/cmd/heartbeat/heartbeat.go b/cmd/heartbeat/heartbeat.go index de289e26..ef8847b7 100644 --- a/cmd/heartbeat/heartbeat.go +++ b/cmd/heartbeat/heartbeat.go @@ -185,6 +185,8 @@ func buildHeartbeats(params paramscmd.Params) []heartbeat.Heartbeat { params.Heartbeat.IsWrite, params.Heartbeat.Language, params.Heartbeat.LanguageAlternate, + params.Heartbeat.LineAdditions, + params.Heartbeat.LineDeletions, params.Heartbeat.LineNumber, params.Heartbeat.LinesInFile, params.Heartbeat.LocalFile, @@ -210,6 +212,8 @@ func buildHeartbeats(params paramscmd.Params) []heartbeat.Heartbeat { h.IsWrite, h.Language, h.LanguageAlternate, + h.LineAdditions, + h.LineDeletions, h.LineNumber, h.Lines, h.LocalFile, diff --git a/cmd/offline/offline.go b/cmd/offline/offline.go index a837ff72..5680e4f9 100644 --- a/cmd/offline/offline.go +++ b/cmd/offline/offline.go @@ -90,6 +90,8 @@ func buildHeartbeats(params paramscmd.Params) []heartbeat.Heartbeat { params.Heartbeat.IsWrite, params.Heartbeat.Language, params.Heartbeat.LanguageAlternate, + params.Heartbeat.LineAdditions, + params.Heartbeat.LineDeletions, params.Heartbeat.LineNumber, params.Heartbeat.LinesInFile, params.Heartbeat.LocalFile, @@ -115,6 +117,8 @@ func buildHeartbeats(params paramscmd.Params) []heartbeat.Heartbeat { h.IsWrite, h.Language, h.LanguageAlternate, + h.LineAdditions, + h.LineDeletions, h.LineNumber, h.Lines, h.LocalFile, diff --git a/cmd/params/params.go b/cmd/params/params.go index c764ce6e..acadc0a6 100644 --- a/cmd/params/params.go +++ b/cmd/params/params.go @@ -86,6 +86,8 @@ type ( IsWrite any `json:"is_write"` Language *string `json:"language"` LanguageAlternate string `json:"alternate_language"` + LineAdditions any `json:"line_additions"` + LineDeletions any `json:"line_deletions"` LineNumber any `json:"lineno"` Lines any `json:"lines"` Project string `json:"project"` @@ -106,6 +108,8 @@ type ( IsWrite *bool Language *string LanguageAlternate string + LineAdditions *int + LineDeletions *int LineNumber *int LinesInFile *int LocalFile string @@ -401,6 +405,16 @@ func LoadHeartbeatParams(v *viper.Viper) (Heartbeat, error) { isWrite = heartbeat.PointerTo(b) } + var lineAdditions *int + if num := v.GetInt("line-additions"); v.IsSet("line-additions") { + lineAdditions = heartbeat.PointerTo(num) + } + + var lineDeletions *int + if num := v.GetInt("line-deletions"); v.IsSet("line-deletions") { + lineDeletions = heartbeat.PointerTo(num) + } + var lineNumber *int if num := v.GetInt("lineno"); v.IsSet("lineno") { lineNumber = heartbeat.PointerTo(num) @@ -442,6 +456,8 @@ func LoadHeartbeatParams(v *viper.Viper) (Heartbeat, error) { IsWrite: isWrite, Language: language, LanguageAlternate: vipertools.GetString(v, "alternate-language"), + LineAdditions: lineAdditions, + LineDeletions: lineDeletions, LineNumber: lineNumber, LinesInFile: linesInFile, LocalFile: vipertools.GetString(v, "local-file"), @@ -971,6 +987,16 @@ func (p Heartbeat) String() string { language = *p.Language } + var lineAdditions string + if p.LineAdditions != nil { + lineAdditions = strconv.Itoa(*p.LineAdditions) + } + + var lineDeletions string + if p.LineDeletions != nil { + lineDeletions = strconv.Itoa(*p.LineDeletions) + } + var lineNumber string if p.LineNumber != nil { lineNumber = strconv.Itoa(*p.LineNumber) @@ -984,8 +1010,9 @@ func (p Heartbeat) String() string { return fmt.Sprintf( "category: '%s', cursor position: '%s', entity: '%s', entity type: '%s',"+ " num extra heartbeats: %d, guess language: %t, is unsaved entity: %t,"+ - " is write: %t, language: '%s', line number: '%s', lines in file: '%s',"+ - " time: %.5f, filter params: (%s), project params: (%s), sanitize params: (%s)", + " is write: %t, language: '%s', line additions: '%s', line deletions: '%s',"+ + " line number: '%s', lines in file: '%s', time: %.5f, filter params: (%s),"+ + " project params: (%s), sanitize params: (%s)", p.Category, cursorPosition, p.Entity, @@ -995,6 +1022,8 @@ func (p Heartbeat) String() string { p.IsUnsavedEntity, isWrite, language, + lineAdditions, + lineDeletions, lineNumber, linesInFile, p.Time, diff --git a/cmd/params/params_test.go b/cmd/params/params_test.go index c6688b4c..0eac4073 100644 --- a/cmd/params/params_test.go +++ b/cmd/params/params_test.go @@ -2461,6 +2461,8 @@ func TestHeartbeat_String(t *testing.T) { IsUnsavedEntity: true, IsWrite: heartbeat.PointerTo(true), Language: heartbeat.PointerTo("Golang"), + LineAdditions: heartbeat.PointerTo(123), + LineDeletions: heartbeat.PointerTo(456), LineNumber: heartbeat.PointerTo(4), LinesInFile: heartbeat.PointerTo(56), Time: 1585598059, @@ -2470,8 +2472,9 @@ func TestHeartbeat_String(t *testing.T) { t, "category: 'coding', cursor position: '15', entity: 'path/to/entity.go', entity type: 'file',"+ " num extra heartbeats: 3, guess language: true, is unsaved entity: true, is write: true,"+ - " language: 'Golang', line number: '4', lines in file: '56', time: 1585598059.00000, filter"+ - " params: (exclude: '[]', exclude unknown project: false, include: '[]', include only with"+ + " language: 'Golang', line additions: '123', line deletions: '456', line number: '4',"+ + " lines in file: '56', time: 1585598059.00000, filter params: (exclude: '[]',"+ + " exclude unknown project: false, include: '[]', include only with"+ " project file: false), project params: (alternate: '', branch alternate: '', map patterns:"+ " '[]', override: '', git submodules disabled: '[]', git submodule project map: '[]'), sanitize"+ " params: (hide branch names: '[]', hide project folder: false, hide file names: '[]',"+ diff --git a/cmd/root.go b/cmd/root.go index 4975cd8d..1be235e3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -153,6 +153,8 @@ func setFlags(cmd *cobra.Command, v *viper.Viper) { 0, "Optional lines in the file. Normally, this is detected automatically but"+ " can be provided manually for performance, accuracy, or when using --local-file.") + flags.Int("line-additions", 0, "Optional number of lines added since last heartbeat in the current file.") + flags.Int("line-deletions", 0, "Optional number of lines deleted since last heartbeat in the current file.") flags.String( "local-file", "", diff --git a/main_test.go b/main_test.go index aeca0cd2..2fd3ad9b 100644 --- a/main_test.go +++ b/main_test.go @@ -129,6 +129,8 @@ func testSendHeartbeats(t *testing.T, projectFolder, entity, p string) { "--entity", entity, "--cursorpos", "12", "--offline-queue-file", offlineQueueFile.Name(), + "--line-additions", "123", + "--line-deletions", "456", "--lineno", "42", "--lines-in-file", "100", "--time", "1585598059", @@ -213,6 +215,8 @@ func TestSendHeartbeats_SecondaryApiKey(t *testing.T) { "--entity", "testdata/main.go", "--cursorpos", "12", "--offline-queue-file", offlineQueueFile.Name(), + "--line-additions", "123", + "--line-deletions", "456", "--lineno", "42", "--lines-in-file", "100", "--time", "1585598059", @@ -373,6 +377,8 @@ func TestSendHeartbeats_Err(t *testing.T) { "--entity", "testdata/main.go", "--cursorpos", "12", "--offline-queue-file", offlineQueueFile.Name(), + "--line-additions", "123", + "--line-deletions", "456", "--lineno", "42", "--lines-in-file", "100", "--time", "1585598059", diff --git a/pkg/heartbeat/heartbeat.go b/pkg/heartbeat/heartbeat.go index dba0a75d..17892717 100644 --- a/pkg/heartbeat/heartbeat.go +++ b/pkg/heartbeat/heartbeat.go @@ -31,6 +31,8 @@ type Heartbeat struct { IsWrite *bool `json:"is_write,omitempty"` Language *string `json:"language,omitempty"` LanguageAlternate string `json:"-"` + LineAdditions *int `json:"line_additions,omitempty"` + LineDeletions *int `json:"line_deletions,omitempty"` LineNumber *int `json:"lineno,omitempty"` Lines *int `json:"lines,omitempty"` LocalFile string `json:"-"` @@ -58,6 +60,8 @@ func New( isWrite *bool, language *string, languageAlternate string, + lineAdditions *int, + lineDeletions *int, lineNumber *int, lines *int, localFile string, @@ -78,6 +82,8 @@ func New( IsWrite: isWrite, Language: language, LanguageAlternate: languageAlternate, + LineAdditions: lineAdditions, + LineDeletions: lineDeletions, LineNumber: lineNumber, Lines: lines, LocalFile: localFile, diff --git a/pkg/heartbeat/heartbeat_test.go b/pkg/heartbeat/heartbeat_test.go index 37c2235b..c987d1f3 100644 --- a/pkg/heartbeat/heartbeat_test.go +++ b/pkg/heartbeat/heartbeat_test.go @@ -28,6 +28,8 @@ func TestNew(t *testing.T) { heartbeat.PointerTo(true), heartbeat.PointerTo("Go"), "Golang", + heartbeat.PointerTo(2), + heartbeat.PointerTo(3), heartbeat.PointerTo(42), nil, "/path/to/file", @@ -50,6 +52,8 @@ func TestNew(t *testing.T) { IsWrite: heartbeat.PointerTo(true), Language: heartbeat.PointerTo("Go"), LanguageAlternate: "Golang", + LineAdditions: heartbeat.PointerTo(2), + LineDeletions: heartbeat.PointerTo(3), LineNumber: heartbeat.PointerTo(42), LocalFile: "/path/to/file", ProjectAlternate: "billing", @@ -94,6 +98,8 @@ func TestHeartbeat_JSON(t *testing.T) { EntityType: heartbeat.FileType, IsWrite: heartbeat.PointerTo(true), Language: heartbeat.PointerTo("Go"), + LineAdditions: heartbeat.PointerTo(123), + LineDeletions: heartbeat.PointerTo(456), LineNumber: heartbeat.PointerTo(42), Lines: heartbeat.PointerTo(100), Project: heartbeat.PointerTo("wakatime"), diff --git a/pkg/heartbeat/testdata/heartbeat.json b/pkg/heartbeat/testdata/heartbeat.json index 56a6c0b2..1486420f 100644 --- a/pkg/heartbeat/testdata/heartbeat.json +++ b/pkg/heartbeat/testdata/heartbeat.json @@ -1,15 +1,17 @@ { - "branch": "heartbeat", - "category": "coding", - "cursorpos": 12, - "dependencies": ["dep1", "dep2"], - "entity": "/tmp/main.go", - "is_write": true, - "language": "Go", - "lineno": 42, - "lines": 100, - "project": "wakatime", - "type": "file", - "time": 1585598060.1, - "user_agent": "wakatime/13.0.7" + "branch": "heartbeat", + "category": "coding", + "cursorpos": 12, + "dependencies": ["dep1", "dep2"], + "entity": "/tmp/main.go", + "is_write": true, + "language": "Go", + "lineno": 42, + "lines": 100, + "line_additions": 123, + "line_deletions": 456, + "project": "wakatime", + "type": "file", + "time": 1585598060.1, + "user_agent": "wakatime/13.0.7" } diff --git a/testdata/api_heartbeats_request_template.json b/testdata/api_heartbeats_request_template.json index 59119e3f..fa2a8920 100644 --- a/testdata/api_heartbeats_request_template.json +++ b/testdata/api_heartbeats_request_template.json @@ -6,6 +6,8 @@ "entity": "%s", "is_write": true, "language": "Go", + "line_additions": 123, + "line_deletions": 456, "lineno": 42, "lines": 100, "project": "%s", diff --git a/testdata/extra_heartbeats.json b/testdata/extra_heartbeats.json index f1b2b1e7..af299b03 100644 --- a/testdata/extra_heartbeats.json +++ b/testdata/extra_heartbeats.json @@ -1 +1 @@ -[{ "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "vscode-wakatime", "time": 1585598059 }] +[{ "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "line_additions": 123, "line_deletions": 456, "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "wakatime-cli", "time": 1585598059 }, { "alternate_language": "Golang", "alternate_project": "billing", "category": "coding", "cursorpos": 12, "entity": "testdata/main.go", "entity_type": "file", "is_write": true, "language": "Go", "lineno": 42, "lines": 45, "project": "vscode-wakatime", "time": 1585598059 }]