Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struct tips not pretty with go modules #109

Open
ramya-rao-a opened this issue Feb 4, 2019 · 7 comments
Open

Struct tips not pretty with go modules #109

ramya-rao-a opened this issue Feb 4, 2019 · 7 comments

Comments

@ramya-rao-a
Copy link

From @xujintao on January 24, 2019 6:52

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
}

Copied from original issue: microsoft/vscode-go#2274

@ramya-rao-a
Copy link
Author

From @Delphier on January 24, 2019 11:31

+1

@ramya-rao-a
Copy link
Author

Is it different in a non module mode?

@ramya-rao-a
Copy link
Author

From @xujintao on January 31, 2019 9:55

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

@ramya-rao-a
Copy link
Author

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

@ramya-rao-a
Copy link
Author

From @xujintao on February 4, 2019 1:45

module
image

non-module
image

@ramya-rao-a
Copy link
Author

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
Author

cc @ianthehat, @rogpeppe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant