Coder Social home page Coder Social logo

Comments (3)

nxvl avatar nxvl commented on June 16, 2024

you need to run

go get -d github.com/goadapp/goad
make $OS

Where OS is either osx, linux or windows

The reason this happens is that you need to build the bindata.

from goad.

BetaGrumm avatar BetaGrumm commented on June 16, 2024

Excellent. Thank you.

from goad.

amitbmas90 avatar amitbmas90 commented on June 16, 2024

I have same question regarding asset function.My code is as follows:
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/lambda"
"github.com/aws/aws-sdk-go/aws/session"
)
func main(){
creds := credentials.NewSharedCredentials("", "default")
credValue, err := creds.Get()
if err != nil {
fmt.Println(err)
}
fmt.Println("Value of credentials : ", credValue)
region :="ap-southeast-1"
zip, err := Asset("data/lambda.zip")
svc := lambda.New(session.New())
createLambdaFunction(svc,zip)
}

func createLambdaFunction(svc *lambda.Lambda,payload []byte) error{
function, err := svc.CreateFunction(&lambda.CreateFunctionInput{
Code: &lambda.FunctionCode{
ZipFile: payload,
},
FunctionName: aws.String("goad"),
Handler: aws.String("index.handler"),
Runtime: aws.String("nodejs4.3"),
MemorySize: aws.Int64(1536),
Publish: aws.Bool(true),
Timeout: aws.Int64(300),
})
if err != nil {
return err
}
return err
}
~
And My data dir is as follows:
root@ip-172-31-30-18:~/data# ls
lambda lambda.zip

Can you guys please help me I am getting
undefined: Asset

from goad.

Related Issues (20)

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.