I want to know if the project is still under maintenance. If there is still maintenance, I would like to submit some Chinese comments for the code.
I am using centos 7.
[puneets@server1]~/MyWork/experiments/exp2>export GOPATH=$PWD/
[puneets@server1]~/MyWork/experiments/exp2>ls
[puneets@server1]~/MyWork/experiments/exp2>
[puneets@server1]~/MyWork/experiments/exp2>
[puneets@server1]~/MyWork/experiments/exp2>mkdir bin src pkg
[puneets@server1]~/MyWork/experiments/exp2>ls
bin pkg src
[puneets@server1]~/MyWork/experiments/exp2>go get -d github.com/GoesToEleven/GolangTraining/...
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
[puneets@server1]~/MyWork/experiments/exp2>go mod init github.com/test
go: creating new go.mod: module github.com/test
go: to add module requirements and sums:
go mod tidy
[puneets@server1]~/MyWork/experiments/exp2>go get -d github.com/GoesToEleven/GolangTraining/...
$GOPATH/go.mod exists but should not
Why GO is not allowing me download course material in workspace?
Did i miss anything here?
Is there a way to download course material in $PWD or $GOPATH ?
I want to learn go, can some give me some suggest?
How to use the REPL mode in the Golang language
"github.com/GoesToEleven/GolangTraining/47_templates/04_template_csv-parse/parse"
"github.com/GoesToEleven/GolangTraining/56_twitter/18_abstract-API-Model/api"
"github.com/GoesToEleven/GolangTraining/56_twitter/19_abstract-API-Model_AE-fix/Model"
"github.com/GoesToEleven/GolangTraining/56_twitter/19_abstract-API-Model_AE-fix/API"
"github.com/GoesToEleven/GolangTraining/56_twitter/19_abstract-API-Model_AE-fix/Memcache"
Without the go.mod an IDE would show errors in a file where modules are used, e.g. 02_package/main/main.go. Why not add a go.mod with just one line?
module github.com/GoesToEleven/GolangTraining
A readme seems like the bare minimum.
Fam pic.md
Join us on our Discord and a member of our team will be happy to help!
Speak to a member of our team: @JamieSlome
This issue was automatically generated by huntr.dev - a bug bounty board for securing open source code.
Problem Description : There is dll( A1.dll- compiled in C++) in which a function is defined as
EXPORT void S3(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow){}
A1.dll
`// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include
//#include
#define EXPORT extern "C" __declspec(dllexport)
EXPORT void S3(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
{
MessageBox(NULL, TEXT("Hello World"),
TEXT("In a DLL"), MB_OK);
}
**I want to load this DLL using GO lang. For this I am writing below program:**package main
import (
"fmt"
"syscall"
"golang.org/x/sys/windows"
)
func main() {
dll, err := syscall.LoadDLL("A1.dll")
proc, err := dll.FindProc("S3")
_, _, dllError := proc.Call()
fmt.Println("calling S3")
fmt.Printf("Error, err: %s\n", dllError)
fmt.Printf("Error, err: %s\n", err)
}`
This is not working. Also I am not able to understand that here how to pass the parameter in call function according to function S3 definition. Could anybody help me in understanding this issue?
can't load package: package github.com/GoesToEleven/GolangTraining: no Go files in go/src/github.com/GoesToEleven/GolangTraining
import "fmt' direcly lose when i save it
I want to add the effect of CSS file in GO code. HTML is added to it. Can somebody say how to add CSS file.
I want to design a webpage using Go using HTML script. But I am quite unsure whether to use the HTML script directly to the Go source code or whether create a index.html in the similar directory. Can someone help me out with this.
After printing the string program panics and terminate.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x11eb2f0]
goroutine 1 [running]:
main.main()
<path>/main.go:21 +0x160
Hey Todd,
Great stuff on these Udemy vids and code, I'm learning a lot. One thing I noticed however was the code here uses a Sleep in main() to wait for the goroutines to finish. I'm fine with using Sleep for testing deadlocks and race conditions but I modified this to not used a Sleep and use either a WaitGroup or boolean channel semaphores. Ran into issues and couldn't understand with such a simple example why trying to implement these schemes failed and the Sleep would work. Finally realized the goroutine in the infinite loop just dies when the main thread is finished by the end of the Sleep.
I've attached a txt file of the main.go file since I can't attach *.go types. It's got code for using for loop or channel range and WaitGroup or semaphores. One thing I did find out while testing and not sure if you mentioned this in your videos or not but if you used a channel range YOU MUST EXPLICITLY CLOSE THE CHANNEL or it will hang at the range loop.
Somewhere I read that the channels don't consume system resources like a network connection or a file open so unless they are being consumed through a channel/range loop it's not always necessary to handle closing them, they just get eligible for garbage collection when going out of scope and having no references.
Hopefully, this makes sense and may provide a little cleaner implementation should someone else try to do what I did.
Thanks,
Howard