How to get stats on go packages? [closed] - go

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am trying to track and understand the download stats for various go packages to evaluate the download patter over time for the go driver published and released by my team.
Something similar to npm-stats
https://npm-stat.com/
I see similar stats available for pip-python and npm.
https://npm-stat.com/

That may happen once the Go Notary service described in "Go Modules in 2019" is in place:
For publicly-available modules, we intend to run a service we call a notary that follows the module index log, downloads new modules, and cryptographically signs statements of the form “module M at version V has file tree hash H.” The notary service will publish all these notarized hashes in a queryable, Certificate Transparency-style tamper-proof log, so that anyone can verify that the notary is behaving correctly.
This log will serve as a public, global go.sum file that go get can use to authenticate modules when adding or updating dependencies.
We are aiming to have the go command check notarized hashes for publicly-available modules not already in go.sum starting in Go 1.13.
If statistics were to be produced, the Go notary would be a reliable source (for public packages)

Go doesn't have a centralized package registry such as npm or pip.
Also, go dependency management is still not "unified", some use dep some glide or go mod. All of these rely on version control software such as git.
If your package is on Github, you could check the Insights > Traffic tab and see unique cloners for example.
Another solution might be to implement a proxy to your git server to track clones.

You Can't do this.
As those are developed as part of Go language. Like npm packages you are not downloading it.

try gocenter.io, it includes download stats for all modules available. Example - logrus was downloaded 544k+ times - https://search.gocenter.io/github.com~2Fsirupsen~2Flogrus/info?version=v1.4.3-0.20191026113918-67a7fdcf741f

Related

Atom certificate has expired [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed last month.
Improve this question
I am trying to install platformio-ide-terminal into Atom 1.63.1. I got the error certificate has expired. I tried alternative Terminus and got the same error. Any package install attempts end with the same error. Please help.
As others have pointed out, GitHub has been ”sunsetting Atom”. Hence its website and all infrastructure have been taken offline. While both major forks, Pulsar and Atom Community, don't provide a full replacement yet, there are other ways to install packages in your existing Atom installation.
Example
# Clone the repository
git clone https://github.com/platformio/platformio-atom-ide-terminal ~/.atom/packages/platformio-ide-terminal
# Change directory to the cloned package
cd ~/.atom/packages/platformio-ide-terminal
# Install dependencies
apm install
If you don't use git, you can simply download the package as zip-file and extract it to the same directory as used in the example above.
Note that some packages might require an additional build step. Take a look at the scripts section of package.json if it includes one or more build commands.
Atom seems dead 🥹 🫶
It seems we have to migrate to "some alternative"…
https://github.blog/2022-06-08-sunsetting-atom/
When we introduced Atom in 2011, we set out to give developers a text editor that was deeply customizable but also easy to use—one that made it possible for more people to build software. While that goal of growing the software creator community remains, we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces.
On June 8, 2022, we announced that we will sunset Atom and archive all projects under the organization on December 15, 2022.
If I’m using Atom, what changes can I expect after the sunset?
Pre-built Atom binaries can continue to downloaded from the atom repository releases
Atom package management will stop working
No more security updates
Teletype will no longer work
Deprecated redirects that supported downloading Electron symbols and headers will no longer work

Why does 'go vet' complain only in some versions of Go? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
Today I included 'go vet' in one of my pipelines that builds a go service. I wonder why go vet's output on my local machine is different from the one that runs on the CI server.
I figured out that the go version differs - at least a bit. My local Go version is 1.12.4 and the CIs is version 1.12.7. This fact would explain the different behaviour, but I don't get why this happens!
There is the smell:
type Something struct {
...
BatteryNumber string `json:"number"`
...
}
type SomethingWithBattery struct {
Something
Number string `json:"number"`
...
}
So, two times 'number' in the struct tags, because Something-struct is nested SomethingWithBattery - 1.12.4 complains, 1.12.7 does not. Why?
Go 1 and the Future of Go Programs
Tools
Finally, the Go toolchain (compilers, linkers, build tools, and so on)
is under active development and may change behavior. This means, for
instance, that scripts that depend on the location and properties of
the tools may be broken by a point release.
go vet is under active development and recently it has been rewritten. There is no compatibility guarantee for tools, only the language.
cmd/vet: Consider reverting tag conflict for embedded fields #30465
go vet fails due to intended shadowing of embedded fields with json
tags.
Also, bug fixes are applied to the Go tools. For example, Issue 30465.

Go: how many packages per project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
While working on my Go project today, I realised I had ran into a small problem. I had a package that had a struct that held a pointer to a struct from another package. However, that package also made use of a struct from the other package. In C and C++, this wouldn't pose an issue, as I'd use a header guard. However, in Go, such a program won't compile due to infinite import recursion.
This made me wonder, are there too many packages in my project? Should I favour bigger packages? I've always been told that each package should be specifically focused on one thing.
Right now, my structure is like this.
game/ <-- imports engine, needs to access the resource manager a lot
video/ <-- rendering goes here
renderer.go
shader.go
scene.go
...
engine/ <-- imports video, file, etc
root.go <-- contains a Root struct, handles initialisation etc
resource.go
...
file/
dds.go
config.go
resource_list.go
script.go
...
main.go
...
That said, here are my questions:
How would you solve this? Would you combine the video and engine packages? Redesign your program so that video no longer depends on engine?
How do you decide when it's appropriate to make a new package? Do you base it on functionality? Do you group it by category?
How much use do you make of the main package? I personally tend to get out of it as quickly as possible, maybe because I'm too used to OOP.
As these questions are rather broad and project-specific, I can only hope this is of any help:
Personally, I would try to create a third package on which both video and engine can rely. Depending on the project though, this might be a difficult thing to do, and they might need to be merged.
A new package is usually about one specific task. Depending on the project, this might be database I/O, including all models as well - but it might also be a package that's just about reading configuration files from the disk.
As I've built mostly web-apps, I use the main package to get things started: listening to ports, calling other functions, making sure database connections are closed properly, etc.
Example (not sure if helpful? ) :
I once had a package that was just about configurations (config), which referred to the rest of the packages (for some reason). The other packages however, depended on those configurations inside config. This is where the main package can come in handy: linking the config package with the other packages, by means of parameters.
The comment from VonC is also very useful and elaborate. It will probably help you more than this.

Download documentation for Appcelerator [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I tried finding a way to download documentation of titanium appcelerator for offline reading
I searched a lot but couldn't find any direct or indirect way to download it
Has anyone downloaded documentation ?
It is not possible (as far as I know) to make the docs offline directly using the online version.
However it is possible to build the docs using the source code, as we all know that Titanium is open-source.
Download the source from: https://github.com/appcelerator/titanium_mobile, or clone the repo with: git clone https://github.com/appcelerator/titanium_mobile.git
Unzip the source code
cd titanium_mobile-master
Ensure that you have python installed, as well as pyyml and pygments, you can install them with: sudo easy_install pyyml, pygments
Ensure you have jsduck installed in your system, if not then install it with: gem install jsduck
write this command: apidoc/docgen.py --format=jsduck --output=dist/apidoc
cd dist/apidoc
jsduck --touch-examples-ui --output Whole titanium.js, where Whole is the output directory containing the generated docs
If you want the builtins to be included in your generated docs make the last command:
jsduck --builtin-classes --touch-examples-ui --output Whole titanium.js
That is it, you have a full searchable Ti docs offline.
By the way, I have found a working solution for one of the most common problems Ti developers face.
Working offline with Titanium Studio:
After going offline, Titanium Studio won't allow you to neither create new projects nor build/package existing projects, to work this around:
-- I have applied this procedure prior to inventing the one below, so I am not sure if it has any effect: http://developer.appcelerator.com/question/119830/use-titanium-withour-internet-connection-or-logged-off, Adam Fisher's procedure.
Open Titanium Studio while offline.
go to: ~/.titanium
vim auth_session.json
change the false to true.
Done
Now you can build and create new project as you like.
I made a shell script out of user1537325's answer. This is specific to Ubuntu 12.04, but you can probably modify it to your own OS without too much trouble. Be sure to upvote his answer as well.
https://gist.github.com/eric-hu/4952258
Warning: The layout and color scheme of the generated docs look different from those of the online docs for Titanium 3.0. I'm not sure if there are differences yet. The output from jsduck also included many warnings about "Unknown type".
You cannot directly download the API documentations from the appcelerator site, but you can use offline surfing softwares to download the website for offline reading
Here are some links from where you'll get some notes
Training resources from appcelerator
You can download and read Appcelerator Titanium Smartphone App Development Cookbook which will help you for developing applications with titanium
http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/BNAPP_ebook
Also you can refer this answers Learning titanium
There's an app for the Mac called Dash (http://kapeli.com/dash). Dash is an off-line documentation browser for software developers. It supports many languages, one of which is the Titanium API; it's a must...if you use a Mac.
However, all the documentation for the Titanium API is available as JSON files (http://docs.appcelerator.com/titanium/data/index.html), so I guess it's just a matter of building an off-line JSON reader.
R
You can download the .mobi file from
"http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/BNAPP_ebook"
and use a mobi to pdf to converter to convert it to pdf format. You can use the free service provided at :
http://www.mobi-to-pdf.com/
to do the conversion.
Hope this helps.
If you use Mac OS X you can install Dash
Dash link
Dash screenshot

Are there any command line validation tools for HTML and CSS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is anyone aware of command line tools that can validate CSS and/or HTML?
The W3C offers its validators for local installation, with directions to use from the command line, but the installation process is a nightmare for anyone who isn't a seasoned Java developer.
I've searched with Google, but can't find anything.
Ideally I'd like to use a tool (or tools) that I can point at my CSS, and have it report back on any errors. I want it to be local to increase the speed of my debugging cycles.
Ideally, the tools will understand HTML5 and CSS3.
There is tidy for HTML. It's more than a validator: it doesn't only check if your HTML is valid, but also tries to fix it. But you can just look at the errors and warnings and ignore the fix if you want.
I'm not sure how well it works with HTML5, but take a look at Wanted: Command line HTML5 beautifier, there are some parameter suggestions.
For CSS there is CSSTidy (I have never used it though.)
Regarding the W3C validator: if you happen to use debian/ubuntu, the package w3c-markup-validator is in the repositories and very easy to install via package management. Packages for other distos are also available.
And the W3C CSS validator is available as a jar, which is easy to use:
java -jar css-validator.jar http://www.w3.org/.
One of the most popular web-based validators is http://validator.nu.
On their About page, they list a command-line script (written in Python) for validation.
On Ubuntu, you can install the package w3c-markup-validator. It provides a CGI web interface. But you do not have to use it.
You can use my w3c-validator-runner to run the validator without having a webserver.
If that does not work, consider starting a webserver. You can then use srackham/w3c-validator.
WC3 has the source to their validators here: https://github.com/w3c
Although not directly a solution to your problem, you could consider using a CSS-extension framework for the validation part. I use SASS extensively in all my web projects and find it indispensible when you get used to it. Besides all the fancy mixins and variables features etc. it will also perform a validation of your CSS/SASS markup and report for errors as it is perfectly backwards compatible with regular CSS3. The nice thing is that it works as a Ruby Gem which means that it runs locally and can be integrated with other workflows through either Ruby or the command line (terminal in unix environment).
Take it for a spin: http://sass-lang.com/docs/yardoc/
Run sass style.scss and see what happens.
Not sure if this works but if you have Node & NPM there is: html-validator and html-validator-cli https://github.com/zrrrzzt/html-validator & https://github.com/zrrrzzt/html-validator-cli

Resources