merge

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 10 Imported by: 0

README

English | 简体中文

Merge Code Commands

The newly generated code based on the Protobuf file will be automatically merged into the local Go file, ensuring that existing business logic remains unaffected. If an error occurs during the merge process, a backup of the pre-merge code will be stored in the /tmp/sponge_merge_backup_code directory, allowing you to restore the previous code state if needed.

Usage Instructions

  1. Create web server based on protobuf

    sponge merge http-pb --dir=serverDir
    
  2. Create gRPC server based on protobuf or sql

sponge merge rpc-pb --dir=serverDir
  1. Create gRPC gateway server based on protobuf

    sponge merge rpc-gw-pb --dir=serverDir
    
  2. Create gRPC + HTTP server based on protobuf

    sponge merge grpc-http-pb --dir=serverDir
    

Documentation

Overview

Package merge is merge the generated code into the template file, you don't worry about it affecting the logic code you have already written, in case of accidents, you can find the pre-merge code in the directory /tmp/sponge_merge_backup_code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCServiceCode

func GRPCServiceCode() *cobra.Command

GRPCServiceCode merge the grpc service code

func GinHandlerCode

func GinHandlerCode() *cobra.Command

GinHandlerCode merge the gin handler code

func GinServiceCode

func GinServiceCode() *cobra.Command

GinServiceCode merge the gin service code

Types

This section is empty.

Directories

Path Synopsis
Package module provides the functions to merge the code of two files.
Package module provides the functions to merge the code of two files.

Jump to

Keyboard shortcuts

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