Skip to content

Source for Go language specific tasks #31013

Closed Answered by SomeoneToIgnore
torikki-tou asked this question in General Q&A
Discussion options

You must be logged in to vote

impl ContextProvider for GoContextProvider {
fn build_context(
&self,
variables: &TaskVariables,
location: &Location,
_: Option<HashMap<String, String>>,
_: Arc<dyn LanguageToolchainStore>,
cx: &mut gpui::App,
) -> Task<Result<TaskVariables>> {
let local_abs_path = location
.buffer
.read(cx)
.file()
.and_then(|file| Some(file.as_local()?.abs_path(cx)));
let go_package_variable = local_abs_path
.as_deref()
.and_then(|local_abs_path| local_abs_path.parent())
.map(|buffer_dir| {
// Prefer the relative form `./my-nested-package/i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by torikki-tou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants