Skip to content

NuGet Config ParserGo Library for NuGet Configuration

Parse, manipulate, and manage NuGet configuration files with ease

NuGet Config Parser

Quick Example

go
package main

import (
    "fmt"
    "log"
    
    "github.com/scagogogo/nuget-config-parser/pkg/nuget"
)

func main() {
    // Create API instance
    api := nuget.NewAPI()
    
    // Find and parse configuration
    config, configPath, err := api.FindAndParseConfig()
    if err != nil {
        log.Fatalf("Failed to find config: %v", err)
    }
    
    // Display package sources
    fmt.Printf("Config file: %s\n", configPath)
    fmt.Printf("Package sources: %d\n", len(config.PackageSources.Add))
    
    for _, source := range config.PackageSources.Add {
        fmt.Printf("- %s: %s\n", source.Key, source.Value)
    }
}

Installation

bash
go get github.com/scagogogo/nuget-config-parser

Key Features

🚀 Easy to Use

Simple, intuitive API that follows Go best practices and conventions.

🔧 Comprehensive

Supports all major NuGet configuration features including package sources, credentials, and global settings.

📝 Well Documented

Extensive documentation with examples for every feature and use case.

🎯 Production Ready

Battle-tested with comprehensive test coverage and error handling.

Released under the MIT License.