mattermost-community-enterp.../vendor/github.com/h2non/go-is-svg/README.md
Claude ec1f89217a Merge: Complete Mattermost Server with Community Enterprise
Full Mattermost server source with integrated Community Enterprise features.
Includes vendor directory for offline/air-gapped builds.

Structure:
- enterprise-impl/: Enterprise feature implementations
- enterprise-community/: Init files that register implementations
- enterprise/: Bridge imports (community_imports.go)
- vendor/: All dependencies for offline builds

Build (online):
  go build ./cmd/mattermost

Build (offline/air-gapped):
  go build -mod=vendor ./cmd/mattermost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:59:07 +09:00

48 lines
1.2 KiB
Markdown

# go-is-svg [![Build Status](https://travis-ci.org/h2non/go-is-svg.png)](https://travis-ci.org/h2non/go-is-svg) [![GoDoc](https://godoc.org/github.com/h2non/go-is-svg?status.svg)](https://godoc.org/github.com/h2non/go-is-svg) [![Coverage Status](https://coveralls.io/repos/github/h2non/go-is-svg/badge.svg?branch=master)](https://coveralls.io/github/h2non/go-is-svg?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/h2non/go-is-svg)](https://goreportcard.com/report/github.com/h2non/go-is-svg)
Tiny package to verify if a given file buffer is an SVG image in Go (golang).
See also [filetype](https://github.com/h2non/filetype) package for binary files type inference.
## Installation
```bash
go get -u github.com/h2non/go-is-svg
```
## Example
```go
package main
import (
"fmt"
"io/ioutil"
svg "github.com/h2non/go-is-svg"
)
func main() {
buf, err := ioutil.ReadFile("_example/example.svg")
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
if svg.Is(buf) {
fmt.Println("File is an SVG")
} else {
fmt.Println("File is NOT an SVG")
}
}
```
Run example:
```bash
go run _example/example.go
```
## License
MIT - Tomas Aparicio