Go Import Cost
Display the size of Go module dependencies inline in your code.
Features
- Shows module sizes in
go.mod files
- Shows import sizes in
.go files
- Displays both uncompressed and zipped sizes
- Smart filtering (ignores stdlib and local packages)
Usage
Open any go.mod or .go file in a Go project and see the sizes displayed inline!
Example
import (
"fmt" // stdlib - no size shown
"github.com/gin-gonic/gin" // 2.3M (zip: 450k)
)
Requirements
- Go installed and available in PATH
- Valid Go module project
Installation
- Open VS Code or click here
- Go to Extensions
- Search for:
Go Import Cost
- Click Install
| |