Go & YAML

2021-11-13  本文已影响0人  michael_jia

YAML

YAML Ain’t Markup Language. YAML is a human friendly data serialization language for all programming languages.

native data structure

native data structure:scalar, sequence or mapping。更多参考 Language Overview

server:
  http_listen_port: 9081
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://172.16.65.131:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: JAVA_AUTH
      host: 172.16.65.132
      __path__: /data/promtail/logs/*log
yaml文件示例

GO

开发环境
  vi ~/.bashrc 文件
  export PATH=$PATH:/usr/local/go/bin
  export GOPATH=/home/jiahm/go
  export GOPROXY=https://goproxy.io,direct
备注
YAML Processing Overview
上一篇 下一篇

猜你喜欢

热点阅读