<commit_before>package main

import "time"

type UserResource struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
}

type TaskResource struct {
	ID          int          `json:"id"`
	CreatedAt   time.Time    `db:"created_at" json:"created_at"`
	User        UserResource `json:"user"`
	Name        string       `json:"name"`
	Description string       `json:"description,omitempty"`
}

type CommentResource struct {
	ID        int          `json:"id"`
	CreatedAt time.Time    `db:"created_at" json:"created_at"`
	User      UserResource `json:"user"`
	TaskID    int          `db:"task_id" json:"task_id"`
	Content   string       `json:"content"`<commit_msg>Use a base resource struct type<commit_after>package main

import "time"

type Resource struct {
	ID int `json:"id"`
}

type UserResource struct {
	Resource
	Username string `json:"username"`
}

type TaskResource struct {
	Resource
	CreatedAt   time.Time    `db:"created_at" json:"created_at"`
	User        UserResource `json:"user"`
	Name        string       `json:"name"`
	Description string       `json:"description,omitempty"`
}

type CommentResource struct {
	Resource
	CreatedAt time.Time    `db:"created_at" json:"created_at"`
	User      UserResource `json:"user"`
	TaskID    int          `db:"task_id" json:"task_id"`
	Content   string       `json:"content"`
{'fraction_non_alphanumeric': 0.116331096196868, 'fraction_numerical': 0.0, 'mean_word_length': 3.206896551724138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5342869', 'n_tokens_mistral': 403, 'n_tokens_neox': 402, 'n_words': 108}