Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

import protoc-gen-grpc-gateway is a program, not an importable package #3515

Closed
labasubagia opened this issue Aug 21, 2023 · 1 comment
Closed

Comments

@labasubagia
Copy link

馃悰 Bug Report

there is an error, when installation
import "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" is a program, not an importable package

To Reproduce

  1. add tools package
// +build tools

package tools

import (
    _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
    _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
    _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
    _ "google.golang.org/protobuf/cmd/protoc-gen-go"
)
  1. run go mod tidy

Expected behavior

No Error

Actual Behavior

Error
image

Environment

go 1.21.0
linux mint 21.1

@johanbrandhorst
Copy link
Collaborator

You can safely ignore this warning from your editor - the tools file is only used to inform the Go modules system of the dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants