github.com/rgonomic/rgo@v0.2.2-0.20220708095818-4747f0905d6e/internal/rgo/config.go (about)

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package rgo
     6  
     7  // Config is an rgo build config.
     8  type Config struct {
     9  	// PkgPath is the package import path for the package
    10  	// to be wrapped by rgo. It depends on the go.mod file
    11  	// at the root of the destination rgo package.
    12  	PkgPath string
    13  
    14  	// AllowedFuncs is a pattern matching names of
    15  	// functions that may be wrapped. If AllowedFuncs
    16  	// is empty all wrappable functions are wrapped.
    17  	AllowedFuncs string
    18  
    19  	// Exported is a pattern matching the Go names of
    20  	// functions that will be exported. If Exported is
    21  	// empty all wrapped functions are exported.
    22  	Exported string
    23  
    24  	// Words is a set of known words that can be provided
    25  	// to ensure camel-case to snake case breaks words
    26  	// correctly. If words is nil, "NaN" and "NA" are
    27  	// used. Set words to []string{} to provide an empty
    28  	// set of words.
    29  	Words []string
    30  
    31  	// LicenseDir is the directory to put license files
    32  	// when more than one license exists.
    33  	LicenseDir string
    34  
    35  	// LicensePattern is the pattern for license file
    36  	// names to check. The pattern is used with the
    37  	// case-insensitive flag.
    38  	LicensePattern string
    39  }