<commit_before>package com.github.blindpirate.gogradle.core.dependency;

import com.github.blindpirate.gogradle.core.GolangPackageModule;

/**
 * Manages global dependency register.
 * When a dependency is resolved, its repo information will be registered here.
 * Later, resolving dependency of same repo can be faster.
 */
public interface DependencyRegistry {
    /**
     * Registers a dependency
     *
     * @param dependency
     * @return true if the dependency is newer than existing dependency with same name.
     */
    boolean register(GolangPackageModule dependency);
}<commit_msg>add method to DependencyRegistry<commit_after>package com.github.blindpirate.gogradle.core.dependency;

/**
 * Manages global dependency register.
 * When a dependency is resolved, its repo information will be registered here.
 * Later, resolving dependency of same repo can be faster.
 */
public interface DependencyRegistry {
    /**
     * Registers a dependency
     *
     * @param dependency
     * @return true if the dependency is newer than existing dependency with same name.
     */
    boolean register(ResolvedDependency dependency);

    ResolvedDependency retrive(String name);
}
{'fraction_non_alphanumeric': 0.073109243697479, 'fraction_numerical': 0.0, 'mean_word_length': 3.8024193548387095, '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': '6651657', 'n_tokens_mistral': 311, 'n_tokens_neox': 295, 'n_words': 110}