aliasfix

package module
v0.0.0-...-4250788 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

aliasfix

A tool to migrate client library imports from go-genproto to the new stubs located in google-cloud-go.

Usage

Make sure you dependencies for the cloud client library you depend on and go-genproto are up to date.

go install cloud.google.com/go/internal/aliasfix/cmd/aliasfix@latest
aliasfix .
go mod tidy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenprotoPkgMigration map[string]Pkg = map[string]Pkg{}/* 217 elements not displayed */

GenprotoPkgMigration maps genproto to google-cloud-go packages and tracks their migration status.

Functions

func ProcessPath

func ProcessPath(path string) error

ProcessPath rewrites imports from go-genproto in terms of google-cloud-go types.

Types

type MigrationStatus

type MigrationStatus int

MigrationStatus represents how far along the alias migration is for a given package.

const (
	// StatusNotMigrated means no progress has been made to migrate the package.
	StatusNotMigrated MigrationStatus = iota
	// StatusInProgress means new types have been generated but there are not
	// yet aliases to these types nor have packages been re-written in terms of
	// these new types.
	StatusInProgress
	// StatusMigrated mean new types are being directly referenced in the GAPIC
	// layer and genproto aliases are in place.
	StatusMigrated
)

type Pkg

type Pkg struct {
	// ImportPath in the new import path for types.
	ImportPath string
	// Status is current migration status of the associated ImportPath's types.
	Status MigrationStatus
}

Pkg store information related to the google-cloud-go package and whether it has been migrated.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL