Giter Site home page Giter Site logo

goexpose's Issues

Instructions on local builds?

Can you share a bit more about your build process?

I tried to dockerize this and am getting:

 => ERROR [builder 8/8] RUN echo "Compiling for darwin-amd64..." &&     glide novendor &&     env GOOS=darwin GOARCH=amd64 go build -ldflags "-s" -o build/goexpose-darwin-amd64-1.0.0 ./cmd/goexpose                                             0.3s
------
 > [builder 8/8] RUN echo "Compiling for darwin-amd64..." &&     glide novendor &&     env GOOS=darwin GOARCH=amd64 go build -ldflags "-s" -o build/goexpose-darwin-amd64-1.0.0 ./cmd/goexpose:
#15 0.153 Compiling for darwin-amd64...
#15 0.244 ./cmd/...
#15 0.244 .
#15 0.253 go: cannot find main module, but found glide.lock in /go/src/app
#15 0.253 	to create a module there, run:
#15 0.253 	go mod init
------

Heres my Dockerfile

# Build stage
FROM golang:latest as builder

RUN apt-get update && \
    apt-get install -y git

WORKDIR /go/src/app

# Install Glide
RUN curl -sL https://github.com/Masterminds/glide/releases/download/v0.13.2/glide-v0.13.2-linux-amd64.tar.gz | tar -xz && \
    mv linux-amd64/glide /usr/local/bin/glide

# Copy the source code and Glide files
COPY . .
COPY glide.* ./

# Install the project dependencies
RUN glide install

# Set environment variables
ARG version=1.0.0

# Run the build script
#RUN echo "Compiling for darwin-amd64..." && \
#    env GOOS=darwin GOARCH=amd64 go build -ldflags "-s" -o build/goexpose-darwin-amd64-$version ./cmd/goexpose

# Run the build script with Glide
RUN echo "Compiling for darwin-amd64..." && \
    glide novendor && \
    env GOOS=darwin GOARCH=amd64 go build -ldflags "-s" -o build/goexpose-darwin-amd64-$version ./cmd/goexpose

# Final stage
FROM alpine:latest

WORKDIR /root/

# Copy the binary from the builder stage
COPY --from=builder /go/src/app/build/goexpose-darwin-amd64-$version .

# Add any other necessary setup or runtime dependencies here

# Run the binary
CMD ["./goexpose-darwin-amd64-$version"]

How do you run it?

Obviously there is something I am missing after I do go install .. it does not create any binaries under $GOBIN. Is this program not meant to be used as a standalone program or needs to be called only as a library. I simply want to run it in standalone mode.

go get hangs on go get gopkg.in/inf.v0

Hi,

When I try to install goexpose I get:

go get -v github.com/phonkee/goexpose
Fetching https://gopkg.in/inf.v0?go-get=1
Parsing meta tags from https://gopkg.in/inf.v0?go-get=1 (status code 200)
get "gopkg.in/inf.v0": found meta tag main.metaImport{Prefix:"gopkg.in/inf.v0", VCS:"git", RepoRoot:"https://gopkg.in/inf.v0"} at https://gopkg.in/inf.v0?go-get=1
gopkg.in/inf.v0 (download)

And it hangs there forever.

go version go1.6.2 linux/amd64

Is there any workaround for this?

Many thanks in advance.

Best

Go install not working

Tried installing directly on my machine:

can't load package: package github.com/phonkee/goexpose: cannot find package "github.com/phonkee/goexpose" in any of:
	/usr/local/go/src/github.com/phonkee/goexpose (from $GOROOT)
	/Users/sriramvenkat/work/src/github.com/phonkee/goexpose (from $GOPATH)

github.com/phonkee/wheedle Repository not found

go install github.com/phonkee/goexpose
server.go:17:2: cannot find package "github.com/phonkee/wheedle/errors" in any of:
/home/golang/go/src/github.com/phonkee/wheedle/errors (from $GOROOT)
/home/golang/src/github.com/phonkee/wheedle/errors (from $GOPATH)

stderr output of ShellTask is base64 encoded

Using the following configuration

{
    "host": "127.0.0.1",
    "port": 9900,
    "reload_env": true,
    "endpoints": [
    {
      "path": "/test",
      "methods": {
        "GET": {
          "type": "shell",
          "config": {
            "shell": "/bin/bash",
            "commands": [
              {
                "command": "./error.sh",
                "format": "json"
              }
            ]
          }
        }
      }
    }
    ]
}

and the following test script

#!/bin/sh
echo 'some error response' 1>&2
exit 1

I see the output of stderr is base64 encoded.

Is this expected?

[vagrant@localhost ~]$ ./goexpose-linux-amd64-1.0.0 --config test.json &
[1] 28404

[vagrant@localhost ~]$ curl http://localhost:9900/test
{"message":"OK","result":[{"error":{"Stderr":"c29tZSBlcnJvciByZXNwb25zZQo="},"message":"OK"}],"status":200}

[vagrant@localhost ~]$ echo c29tZSBlcnJvciByZXNwb25zZQo= | base64 --decode
some error response

Binaries

Hi I love goexpose!

Could you please build the binaries and upload them as a release? That would be much appreciated.

Thanks!

Rename the project? :)

Yo there :)

was just coming here after reading about nigit.
I googled goexpose to reach the github repo and I must admit that the google results weren't great -- check yourself :)

Would suggest to rename the project to avoid confusion! ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.