Slamtec's RPLidar scanner is used in robotics, SLAM and solid modelling
applications. It's a small, light and cheap Lidar solution - versions are
available for about $80.
Slamtec publish what they describe as an SDK. Strictly it's just a C++
library of control methods and a few example applic
Aagh! I misunderstood the question. Apologies for that.
There may still be a grain of usefulness in my answer. There are limits to the
complexity of the C code that you can call with cgo. (It’s even worse if you
are calling C++, as I was.) You can magic away a lot of those problems by
writ
Write a separate package to handle the C stuff and call it from the other two.
I built a wrapper for a c++ library:
https://github.com/goblimey/rplidar_sdk_go. The c++ code used various features
that defeated cgo, so I ended up with a multi-layered solution.
One thing I discovered is that cg
I’ve used the Selenium Firefox plugin to test web servers written in Go. It’s
great for end to end testing of a web server because it doesn’t know or care
what the server is written in. It’s only concerned with the resulting HTML.
I recorded some web sessions using the plugin and can then play
Not everybody in the Go community favours the use of mocking tools, so many
published solutions don't have any tests of that kind. Maybe you should
write the tests yourself.
I use pegomock for mocking. (I tried gomock but I found issues that were
not fixed. I also found a couple of issues w
Not a book, but a simple working example.
My scaffolder tool generates a web server in source code from a
specification.
https://github.com/goblimey/scaffolder
The distribution includes an example specification, so you can just
download the tool, run the example and look at the result.
The
AFAIK a template can only access the structure that's passed to to it. It
can't get at any of the other variables of the Go function that executes
it, global or local. All it can do is render the data in the structure
that's passed to it.
On Friday, October 6, 2017 at 6:22:49 AM UTC+1, Hein M
> Is there a particular directory where I should keep the certificate?
That's defined in your program. If you write it yourself, it's up to you.
You can find a small worked example of a program that uses a certificate
here: https://github.com/goblimey/grpc.
Regards
Simon
On Friday, Septemb
I suggest that you use the Model View Controller pattern, which is to say, you
do all the data processing in Go and use your HTML template only to display the
result. For example in your Go driver program, simply create a set of strings.
to be displayed. For a successful backup, the string shou
> Why would someone want to switch from PostgreSQL to MySQL?
It's fairly common to use one database for production and another (often in
memory) for testing, with an ORM hiding the differences.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Just a simple clarification. Your GOPATH variable can contain many
directories, as already pointed out. If so, go get will download packages
into the FIRST directory in the path.
One use of this is to have your own go projects in separate directories
with a single shared set of packages loade
My scaffolding tool generates a web server and some unit and integration
tests. The tests use Peter Gotz' mocking framework pegomock. If you
generate a server with the scaffolder, you can look at the source code and
see how it works.
https://github.com/goblimey/scaffolder
By the way, not eve
Does this have some advantage over truss (or under Linux, strace)?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For m
I was puzzled by something you said earlier:
> The template is the only entity that knows exactly which data from the
data set is needed.
You've just given a bit more information, but I still don't quite
understand.
You have some C code that you don't control and it's producing some
informati
Your original problem was that your user didn't own the directory
/usr/local/go1.4 or it contents. I presume that you named it like that so
that you could keep different versions of Go in different directories.
I do the same, but I did a little more work at the start, to save a lot of
time la
and get drinks to talk about it :D
>>
>> PS: i remember you talked about it earlier, shame i missed it at that
>> time.
>>
>> On Wednesday, May 10, 2017 at 6:31:22 PM UTC+2, Simon Ritchie wrote:
>>>
>>> Given a JSON description of some database tables,
I think the problem is testing. If you use a tool to convert one language to
another, you have to check that the result works, which involves a lot of
testing, possibly as much as you had to do to get the original working in the
first place. So it's expensive.
It will usually be cheaper to le
example sorry i cited your project).
>
> A big Yes for such projects!
>
> Let s generate all the thing and get drinks to talk about it :D
>
> PS: i remember you talked about it earlier, shame i missed it at that time.
>
> On Wednesday, May 10, 2017 at 6:31:22 PM UTC+2, Simo
Given a JSON description of some database tables, the scaffolder tool
creates the database and generates a web application server to manage it.
The resulting app server implements the Create, Read, Update and Delete
(CRUD) operations on the tables.
The idea for the scaffolder comes from the Ru
A web framework that matches what you want to do will save you time. The
trick is to spend less time evaluating frameworks than you save by using
one.
You could try mine. It's very simple, produces some useful basic stuff and
doesn't force too many decisions onto you:
https://github.com/gob
I think interoperability is an important issue. If you are trying to introduce
Go into a mature environment you need to avoid any idea that the existing apps
will have to be rewritten.
For example, gRPC allows a Go application to work with apps written in Java,
C#, RoR, Python and a host of ot
Are you trying to figure out why this happens, or do you just want a
self-signed certificate that works with Go?
Assuming that you want to generate a working certificate, I did some work
in this area a few weeks ago and encountered problems.. I found some
instructions via Google for creating
As some posters have already said, it depends what you are trying to test.
If you want to test what your solution does when it receives a
randomly-generated number, then you don't need to use random numbers. You can
hide the generation of the random number in a type which is defined by an
in
You are right, the documentation for templates is very scanty. You will find
all sorts of useful examples in my scaffolder project
https://github.com/goblimey/scaffolder.
This doesn't answer your main question, but I see that somebody else has done
that.
Simon
--
You received this message b
I'm working on a solution that involves a gRPC connection authenticated
using OAUTH.
I pretty quickly discovered several things:
- gRPC will not allow you to use OAUTH over an http connection. You must
use an https connection.
- There is quite a lot of infrastructure involved
- There are lot
I've just put onto github a working example of an application that loads
and uses a digital certificate. It's not DER, but the code is probably a
good guide as to what you need to do: https://github.com/goblimey/grpc
I hope this helps.
Simon
--
You received this message because you are sub
> Apparently they're all "yahoo" email addresses.
Very few organisations supply free email addresses these days, pretty much
only Google and Yahoo. A few years ago the project I was working on needed
a constant supply of new email addresses for testing. They had to be real
working email addre
I've just created two Google groups for the UK Go community.
The group golang-uk is for discussions about Go that are mainly of interest
to people in the UK. Go is Go wherever you are, so I don't expect this
group to carry many technical discussions, if any. I envisage that its
main use will
Sorry, that last response could have been a bit more helpful.
My templates take a structure as input. When I execute the template, I
pass the structure to the template.
This line in the template:
{{$resourceNameLower := .NameWithLowerFirst}}
takes the contents of the NameWithLowerFirst
The documentation for Go templates is ... scanty.
My scaffolder https://github.com/goblimey/scaffolder includes several
templates that set variables. It does other useful stuff such as driving
template production from a JSON spec, creating templates from other
templates, and so on.
Regards
S
I've just started work on an OAUTH server too. So far I've built the
"simple" example of the RangelReale project. It takes a user name and
password and produces a token, so it seems to do pretty much all the things
that you need. It also gives a reference to the OAUTH RFC. If you haven't
do
I'm also not sure what you are trying to do. However, I think I can see a bug
in your code.
First you run a database query to get a list of values from a field called
data. This could produce up to 10 values.
Next you have a loop which runs through the values and discards them. At the
end o
I have a much simpler approach which works for me. Open the document with a
web browser and it displays it nicely formatted. If you want to put the result
back into the document, open it with a text editor and cut and paste.
I found that Chrome is much faster than Firefox for some large XML fi
> Can I say Procedural is better than OO?
Better at what? It depends what you are trying to do.
The novelist and aeronautical engineer Neville Shute wrote "It has been
said an engineer is a man who can do for five shillings what any fool can
do for a pound".
These days we accept that some eng
> I am looking at building a rest API system ... Looking to use MVC pattern.
I have implemented a very simple database-driven website built using MVC.
It has a single table and RESTful requests implementing the CRUD operations
on the table. The design supports the use of interfaces and Inversi
This could be a bit better explained on the golang website.
First, note that there are potentially three environment variables
involved: PATH; GOROOT and GOPATH.
The Getting Started guide (https://golang.org/doc/install#install) gives
quite a lot of help, and you should read that thoroughly.
> maybe gocron can schedule the http.ListenAndServe to run all the time?
The classic solution (which is how the Apache web server does it) is to
have a shell script that loops forever, starting the web server, waiting
for it to finish and starting it again. So, if the server crashes, the
paren
I agree with Asit, but I would go further. You have one thing that is
fetching files and putting them in a directory. You have another thing
that is exposing the files in a directory via a web interface. Except that
they happen to be working on the same directory, there is no connection
betw
When I said that you can only mock well-behaved classes, I should have said
more.
When I say mock, I mean something that satisfies an interface and drives a
test. You can also use what I call a dummy to drive your test. To me a dummy
is a real structure, such as an http Request, which you cre
I think your problem is this: You have a piece of code that uses a class.
You have two classes, one real, one mock and you want to write some client
code that can use either of them. Is that right?
If you want to use mocking, you must write your classes in the appropriate
way, so you may nee
Responses to a question like this tend to be either very detailed, or
vague. This one has all the gory details.
I develop under Linux. I'm happy to use fancy visual tools, but I also do
a lot of stuff from the command line.
I have a directory GOCODE where I put stuff that I fetch via go get.
If you follow the Model View Controller (MVC) model, you should do all of the
clever stuff in your controller and just use the view to render the result.
When you invoke the view, you pass a structure with it contains the data to
display. The trick is to design your structure to contain all the
directories that
contains tests.
On Fri, Aug 12, 2016 at 7:28 AM, Dan Kortschak <
dan.kortsc...@adelaide.edu.au> wrote:
> go test ./...
>
> On Thu, 2016-08-11 at 23:22 -0700, Simon Ritchie wrote:
> > Is there a simple tool that will search for and run all the tests in a
> Go pr
Is there a simple tool that will search for and run all the tests in a Go
project?
What I'm looking for is a tool that will start at a given directory and descend
recursively through any subdirectories, looking for test files and running them
using go test. Under UNIX you can do this using
> Specifically, is there a recommended pattern on how to use a component
inside another component inside another component passing data to each one
in a transparent way?
That's not awfully specific. I'm guessing that you are thinking of a
particular framework that you have used with another la
I'm having a problem with the -import mechanism in mockgen. I opened an
issue on the gomock github page five days ago, but nobody has responded.
I'm using gomock to generate static mocks. One of my generated mocks is
throwing a syntax error. To fix this, I'm trying to set the name of a
pa
itika?
On Saturday, August 6, 2016 at 9:51:56 AM UTC+1, Simon Ritchie wrote:
>
>
> Actually, I think the word IDE in the question is a red herring. Kritka
> is asking how to create web services that follow the MVC model. All of the
> answers are about somebody's favourite
Actually, I think the word IDE in the question is a red herring. Kritka is
asking how to create web services that follow the MVC model. All of the
answers are about somebody's favourite IDE.
Kritika: if you search Google for "golang web service mvc framework" you
will find information about
This looks like a simple question, but actually it takes a bit of thought
and experimentation to arrive at a working structure.
I'm also working on an MVC solution. I've set up the source code structure
so that it's ready to commit to github, but the first version is not
complete, so it's not
I taught C to second year undergraduates back in the 1990s. By this time,
they had done some COBOL (those were the days), Pascal and assembler. Two
things they had great difficulty with were pointers and multithreading.
Multithreading is not such an issue because you can avoid it while they a
By the way, this is covered by in Donovan & Kernighan's new book The Go
Programming Language. On pages 197 and 198 of the first edition, they describe
an interface Expr, representing an expression, then five concrete types that
satisfy that interface and contain different sorts of expressions a
I think you will be hard put to match the performance of a PHP application on
restart, and it may be faster in general. I've always assumed that this is due
in part to the fact that the app is embedded in the web server and in part to
the essential simplicity of the framework - PHP doesn't do a
Every database offers a limited number of connections because each of them
eats resources. If you are using your database in a commercial
environment, you configure your database with a maximum number of
connections. If you don't do that, the DB will configure some default
maximum, it won't o
This is not a question about Go, but basic web infrastructure. However,
it's one of those "best practice" questions which "everybody knows the
answer to" and so you may be hard put to find out more without knowing
where to start.
First of all, I should point out that when you tweak your PHP pa
54 matches
Mail list logo