thirdparty

package
v0.23.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package thirdparty is the third-party licence file an ActNow app ships (ThirdPartyLicenses.txt in the app's resources): its format, which cmd/actnow-licenses writes and the app's Settings read, and the licence classifier the generator uses to refuse copyleft licences. The family's apps are closed source: no GPL, LGPL or AGPL in what is linked into them; separate programs that ship beside an app, such as ffmpeg, keep their own licence (Ships: program).

The file is plain text, readable as is: a preamble, then one block per component, each opened by a Rule line and a few "Key: value" lines:

################################################################################
Name: mlx-swift
Version: 0.32.3
Source: https://github.com/ml-explore/mlx-swift
Licence: MIT (also Apache-2.0, BSD-3-Clause)
Use: …                       (optional)
Ships: program               (optional: a separate program in the app,
                              not linked into it)

<the licence texts>

Index

Constants

View Source
const FileName = "ThirdPartyLicenses.txt"

FileName is the file's name in the app's resources directory.

View Source
const ShipsProgram = "program"

ShipsProgram is the Ships value of a separate program: an executable that ships inside the app and that the app runs, not code linked into it.

Variables

View Source
var Rule = strings.Repeat("#", 80)

Rule opens a component's block.

Functions

func Check

func Check(text string) (name string, copyleft []string)

Check reports the first component of the file's text that a closed-source app may not ship: one linked in (not a separate program) under a GNU licence, with those licences; "" when there is none.

func Classify

func Classify(text string) []string

Classify returns the licences text is or contains, without repeats, in markers' order; nil when it knows none.

func Copyleft

func Copyleft(id string) bool

Copyleft reports whether a licence id is one a closed-source app may not link: the GNU licences.

func CopyleftIn

func CopyleftIn(licence string) []string

CopyleftIn returns the copyleft licences a Licence line names.

Types

type Component

type Component struct {
	Name, Version, Source, Licence, Use string
	Ships                               string // ShipsProgram, or "" for what is linked in
	Text                                string // the licence texts
}

Component is one block of the file.

func Load

func Load(dir string) (preamble string, comps []Component, err error)

Load reads and parses the file in the resources directory dir.

func Parse

func Parse(text string) (preamble string, comps []Component)

Parse reads the file's text: its preamble and components, in order. Blocks without a Name are skipped.

func (Component) Program

func (c Component) Program() bool

Program reports a separate program (Ships: program), whose licence may be a copyleft one: it is not linked into the app.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL