<commit_before>upsearch () {
    local start_path=$1
    local go_path=$start_path
    while [[ "$go_path" != "" && ! -e "$go_path/$2" ]]; do
        go_path=${go_path%/*}
    done
    echo "$go_path"
}

# Execute go command from go path root using pkg path
go_cmd() {
    local CMD=${1}
    local ARGS=
    local DOC=$2
    local DOC_PATH=`dirname ${DOC}`
    local GOPKGROOT=`upsearch $DOC_PATH src`
    local PKG_PATH=`echo ${DOC_PATH#$GOPKGROOT/src/}`
    
    if [[ "$CMD" == "run" ]]; then
        ARGS=${DOC}
    else
        ARGS=${PKG_PATH}
    fi
    
    cd $GOPKGROOT
    GOPATH=$GOROOT:$GOPKGROOT go ${CMD} ${ARGS}
    
}<commit_msg>Don't add GOROOT to GOPATH<commit_after>upsearch () {
    local start_path=$1
    local go_path=$start_path
    while [[ "$go_path" != "" && ! -e "$go_path/$2" ]]; do
        go_path=${go_path%/*}
    done
    echo "$go_path"
}

# Execute go command from go path root using pkg path
go_cmd() {
    local CMD=${1}
    local ARGS=
    local DOC=$2
    local DOC_PATH=`dirname ${DOC}`
    local GOPKGROOT=`upsearch $DOC_PATH src`
    local PKG_PATH=`echo ${DOC_PATH#$GOPKGROOT/src/}`
    
    if [[ "$CMD" == "run" ]]; then
        ARGS=${DOC}
    else
        ARGS=${PKG_PATH}
    fi
    
    cd $GOPKGROOT
    GOPATH=$GOPKGROOT go ${CMD} ${ARGS}
    
}
{'fraction_non_alphanumeric': 0.16114109483423283, 'fraction_numerical': 0.006168080185042405, 'mean_word_length': 2.595567867036011, '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': '6406560', 'n_tokens_mistral': 526, 'n_tokens_neox': 505, 'n_words': 114}