Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Struct tips not pretty with go modules #2274

Closed
xujintao opened this issue Jan 24, 2019 · 7 comments
Closed

Struct tips not pretty with go modules #2274

xujintao opened this issue Jan 24, 2019 · 7 comments

Comments

@xujintao
Copy link

xujintao commented Jan 24, 2019

Struct tips not pretty with go modules.

vscode verson: 1.30.2
go extension: Go: Install/Update Tools
go version: 1.11.2

//model/person.go

package model

type Person struct {
	Name string
	Age  int
}

// main.go

package main

import (
	"fmt"

	"github.com/xujintao/teststruct/model"
)
func main() {
	p := model.Person{"pi", 20}
	fmt.Println(p)
}

When mouse focus on Person, it tips:

type Person struct{Name string; Age int}

i expect:

type Person struct {
	Name string
	Age  int
}
@Delphier
Copy link

+1

@ramya-rao-a
Copy link
Contributor

Is it different in a non module mode?

@xujintao
Copy link
Author

@ramya-rao-a
Yes, it tips normally in non module mode.

@ramya-rao-a
Copy link
Contributor

Can you please provide a screenshot showing the difference for the same struct in module and non module mode?

@xujintao
Copy link
Author

xujintao commented Feb 4, 2019

module
image

non-module
image

@ramya-rao-a
Copy link
Contributor

Thanks @xujintao!

This data comes from godef which seems to be using different formatting for the content between modules and non modules.

I'll move this issue to the godef repo.

@ramya-rao-a
Copy link
Contributor

This issue was moved to rogpeppe/godef#109

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants